[CELT-dev] CELT grabbing 100KB of memory right off the top
Timothy B. Terriberry
tterribe at xiph.org
Mon Apr 18 12:57:58 PDT 2011
> Is there a particular reason why CELT grabs 100KB of stack immediately?
You'd be much better off using C99 vararrays, or alloca, if either of
those are available, rather than the global stack (which is purely there
as a fallback).
> Is that really required or can that be trimmed down some/a lot?
I don't think anywhere near 100 kB is required. The exact maximum
depends on the mode/frame size, but we haven't gone through and measured
the worst case lately. Even that could probably be substantially
reduced: for example the MDCT uses a lot of temporary buffers, when it
could be made to operate entirely in-place, if necessary.
More information about the celt-dev