[vorbis-dev] memory allocations in codec

Segher Boessenkool segher at chello.nl
Tue Sep 3 17:14:54 PDT 2002



TIMMERMANS ANDRE wrote:
> 
> Hi,
> 
> I was wondering why the decoder does so much malloc/alloca/free
> within the inner decoding stages. Allocating everything at
> the xxx_look() stages would:
> 
> - ensure that on exit of the look stage the decoder as grabbed
>   once and for all the resources required to decode the stream
>   to the end.
> 
> - allows to perform checks on memory allocations, something
>   which is completely lacking at the moment.
> 
> - be more efficient.

alloca() is more efficient than memory allocated for just one purpose :)

<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 'vorbis-dev-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 Vorbis-dev mailing list