[vorbis-dev] memory allocations in codec

TIMMERMANS ANDRE Andre.Timmermans at sbs.be
Tue Sep 3 02:40:41 PDT 2002



> -----Original Message-----
> From:	Michael Smith [SMTP:msmith at labyrinth.net.au]
> Sent:	Tuesday, September 03, 2002 11:21 AM
> To:	vorbis-dev at xiph.org
> Subject:	Re: [vorbis-dev] memory allocations in codec
> 
> At 10:05 AM 9/3/02 +0200, you 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.
> 
> It shouldn't (once it reaches steady-state, at least, which will
> be after a packet or two) be allocating any memory during decoding.
> If it is, that's a (relatively new) bug.
> 
I am not talking about the packet buffering stuff but about
allocations in xxx_inversex() functions like:

float *lsp=_vorbis_block_alloc(vb,sizeof(*lsp)*(look->m+b->dim+1));

in the middle of floor0_inverse1(). Well, ok it's not a malloc
nor an alloca(). ;-)

André
--- >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