[tremor] Embedding Tremor
Johannes Sandvall
js at sandvall.nu
Fri Jan 30 06:48:13 PST 2004
On Fri 30 Jan 2004 15:33:40 CET, James Dabbs wrote:
> I'm evaluating embedding tremor for a fairly deeply embedded ARM
> processor (essentially) running without an OS. Tremor uses
> malloc/realloc/free quite a bit, and I would need to stub out these
> calls and implement something more static. Is this feasible? I'm
> interested in impressions on how big this job might be. Any feedback
> would be greatly appreciated.
I've done that. Basically you need to allocate a buffer upon decoder
creation with fixed size. Define your own malloc, alloca and realloc
that takes memory from that segment. It's not that hard. This also
reduces that stack use (alloca).
That way you could set a maximun uses mem space variable, giving the
maximun memory allocations.
Should take a couple of hours.
What I don't remember is if I did any changes in the code to remove
alloc/dealloc that would fragment the buffer but I don't think so. The
codebooks and other structures are allocated ones in a song, and most
other stuff uses the alloca.
/ Johannes Sandvall
--- >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 'tremor-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 Tremor
mailing list