[PD-dev] [PATCH] Replace getbytes calls by alloca whenever possible in mrpeach's packOSC.c

Julien 'Lta' BALLET elthariel at gmail.com
Fri Dec 10 14:50:09 CET 2010


Hello,

As said in the title, i submit you a small patch to mrpeach's osc code, to
replace calls to getbytes by alloca calls in part of the code that might get
called in the soundcard callback.

The considered memory sizes are quites small and then won't smash the stack.
This removes the need for memory deallocation and reduces the page fault
risk as well as the memory allocation time.

This is kind of a naive patch, since i don't fully know yet the pd codebase.

Any comment would be appreciated.

Regards,
Lta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20101210/a345facb/attachment.htm>


More information about the Pd-dev mailing list