[tremor] solution to alloca() on platfomrs that dont support it

Segher Boessenkool segher at koffie.nl
Tue Oct 15 15:52:19 PDT 2002



bobbydigi at btinternet.com wrote:
> 
> Hi,
> 
> from reading this,
>  http://compilers.iecc.com/comparch/article/91-12-079
> 
> , Doug Gwyn's version will severly effect the performance of tremor as it doesnt allocate from the stack and will incur large memory penaltys, "Cleanup (freeing) can be delayed long enough that the memory
> demands are huge, as large as all storage ever alloca()'d." eek!

So call    alloca(0);   once in a while; it collects the garbage.

> if this all sounds like mad rambling then just tell me, but i think that as there seems to be no standard definition of alloca() and as it's also platform and compiler dependent, we should consider alternatives.

Just do the malloc() thing, for broken platforms.  If you want speed, you
don't want libvorbis
anyway.

<p>Segher
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'tremor-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Tremor mailing list