[yoshimi-user] memory allocation in RT context?

  • From: Dan Mills <dan.mills.00@xxxxxxxxx>
  • To: yoshimi-user <yoshimi-user@xxxxxxxxxxxxxxxxxxxxx>
  • Date: Sun, 22 Jun 2014 18:37:33 +0100

Hi all,
I was just poking around in src/Misc/Part.cpp to figure out how the
whole thing hung together and much to my surprise saw things like :

partnote[pos].kititem[0].adnote =
new ADnote(kit[0].adpars, ctl, notebasefreq, vel,
portamento, note, false ); // not silent

(Line 520ish).

This is IMHO all sorts of broken from a realtime software perspective.

Would it not be better to have a statically allocated pool of notes
corresponding to whatever degree of polyphony we have configured and
then just play pointer games here rather then calling new which is
quite capable of blocking?

Regards, Dan.


Other related posts:

  • » [yoshimi-user] memory allocation in RT context? - Dan Mills