| From | Sent On | Attachments |
|---|---|---|
| august | Apr 14, 2003 8:16 am | |
| Frank Barknecht | Apr 14, 2003 9:54 am | |
| Thomas Grill | Apr 14, 2003 10:10 am | |
| august | Apr 14, 2003 10:20 am | |
| august | Apr 14, 2003 10:26 am | |
| Thomas Grill | Apr 14, 2003 10:34 am | |
| august | Apr 14, 2003 10:38 am | |
| Frank Barknecht | Apr 14, 2003 10:41 am | |
| Thomas Grill | Apr 14, 2003 11:04 am | |
| august | Apr 14, 2003 11:11 am | |
| Mathieu Bouchard | Apr 14, 2003 11:52 am | |
| Maurizio Umberto Puxeddu | Apr 20, 2003 8:58 am | |
| Maurizio Umberto Puxeddu | Apr 22, 2003 3:07 pm |
| Subject: | Re: [PD] readanysf~ almost beta | |
|---|---|---|
| From: | Mathieu Bouchard (mat...@sympatico.ca) | |
| Date: | Apr 14, 2003 11:52:18 am | |
| List: | at.iem.pd-list | |
On Mon, 14 Apr 2003, august wrote:
float buf[n*2]; // always multiply by the number of audio signal outlets n is not constant since it's a function argument, and you try to reserve an array of float with that. Amazing that your compiler digests that (mine doesn't) ... it's definitely not C++ as i know it.
im not sure, but i think it treats the float[] kindof like a new() call.
This is a GCC-specific extension to C/C++; it's a shortcut for alloca(), which does its allocation on the stack, while new and malloc() do their allocation on the heap; alloca() blocks disappear automatically upon returning from a function. new/malloc() blocks need to be deallocated.
What compiler are you using?
(note: I'm using quite a bit of GCC-specific features in my code, which is usually OK on Linux and MacOSX and Cygwin, but not good elsewhere)
________________________________________________________________ Mathieu Bouchard http://artengine.ca/matju





