[Speex-dev] Memory Allocation to St

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Wed Mar 14 07:59:10 PDT 2007


That's just a rule of thumb to make sure we have enough. Note that this
code is only used when no sane stack allocation method is found (C99
variable-size arrays of alloca). If you have such a broken system, then
you can always reduce that number, depending on the actual features you use.

	Jean-Marc

Vinay Kumar a écrit :
> Can anyone tell me why the size of st is defined as:
> 
>  
> 
>       st = (EncState*)speex_alloc(sizeof(EncState)+8000*sizeof(float));
> 
>  
> 
> Reference: nb_encode_init function.
> 
>  
> 
> Specifically, I would like to know why 8000 floats are allocated?
> 
>  
> 
> Thanks and regards,
> 
> Vinay
> 
>  
> 
>  
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev


More information about the Speex-dev mailing list