Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Dynamic memory allocation?

Re: Dynamic memory allocation?

From: Steve Moskovchenko <stevenm_at_umd.edu>
Date: 2006-01-03

Hello.

You can sort of write your own malloc (not sure about free?) if you need
it. Check out the source code to MIDI, this uses it for a fact. You
basically get a pointer to the MP3 buffer and start giving out space
from there. This works well if you allocate a bunch of things in the
beginning of your program but do not have any malloc/free cycles within
your loops... then you would run out of space and may have to rethink
how you code that.

On Mon, 2006-01-02 at 21:46 +0100, Tobias Heimann wrote:
> Hi guys,
>
> I've just started to develop a plugin for rockbox and stumbled over the
> memory allocation:
> Is there anything like malloc() and free() in rockbox and if yes, which
> headers do I have to include for that?
>
> So far, I've only found buffer_alloc() in buffer.h, but that results in
> an undefined reference error.
> I'm building for the coldfire m68k btw.
>
> Thanks for any help,
> Tobias
>

Received on Tue Jan 3 03:55:59 2006

Page was last modified "Jan 10 2012" The Rockbox Crew
aaa