[PD-dev] resampling patch ; settable dacblocksize

Mathieu Bouchard matju at sympatico.ca
Wed Nov 17 19:33:00 CET 2004


On Wed, 17 Nov 2004, Thomas Grill wrote:

> > ah, sh*t...
> > isn't there any possibility to get variable sized arrays withing msvc ?
> Not to my knowledge.
> In such cases i always assign some (probably oversized) static/auto memory
> for the most common array sizes and do dynamic allocation for the rest.

Actually, the variable-size stack-allocated arrays of GNU C is "syntactic 
sugar" over a function called alloca(size) that does just the
same. However that function is not ANSI, not ISO and not even POSIX. It
seems to be rather confined to BSD & Linux.

Maybe I should stop my wanton use of that feature (i use the GNU C/C++ 
syntax, not alloca itself), because several systems (Ruby,Pd) are eager
to complain when the current stack content just _appears_ to be too big,
because that's how they detect an infinite recursion (!!!), so they
tend to choke when I put several *video frames* on the stack. :-]

_____________________________________________________________________
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju





More information about the Pd-dev mailing list