Re: [yoshimi-user] memory allocation in RT context?

  • From: "Mark D. McCurry" <mark.d.mccurry@xxxxxxxxx>
  • To: yoshimi-user@xxxxxxxxxxxxxxxxxxxxx
  • Date: Sun, 22 Jun 2014 15:35:44 -0400

On Sun, Jun 22, 2014 at 06:37:33PM +0100, Dan Mills wrote:

This is IMHO all sorts of broken from a realtime software perspective.
Welcome to the source of this monstrosity.
There are more grievous offenses in the source, but this is one of the
ones that is up on the chopping block.

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?
A static pool of notes is insufficient, or to be more specific
it is unrealistic.
Due to kits and voices a all-in-one instance of a note is not
necessarily that practical.
Essentially a pool (or a pool of pools) of all objects that are
contained within a note would be needed.
This is something that will surely be done at some stage, though
in practice the allocations/deallocations wreck much less havoc
than you'd expect.

--Mark

Attachment: pgpFVmT6D69x5.pgp
Description: PGP signature

Other related posts: