[Speex-dev] Memory Allocation to St
Vinay Kumar
vinay at chipwerks.com
Wed Mar 14 22:49:39 PDT 2007
Thanks. That helps a lot.
Regards,
Vinay
-----Original Message-----
From: Jean-Marc Valin [mailto:jean-marc.valin at usherbrooke.ca]
Sent: Wednesday, March 14, 2007 8:29 PM
To: Vinay Kumar
Cc: speex-dev at xiph.org
Subject: Re: [Speex-dev] Memory Allocation to St
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