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: malloc in plugins

Re: malloc in plugins

From: Hardeep Sidhu <hardeeps_at_pobox.com>
Date: Thu, 08 Jan 2004 17:02:30 -0800

BlueChip wrote:

> At 22:37 08/01/04, you wrote:
>
>> BlueChip wrote:
>> > HEEEEEELP
>> >
>> > I have been stumped by malloc! I need/want to use malloc/free in a
>> plugin
>>
>> We have no heap, and thus no malloc.
>>
>> You are of course free to implement dynamic allocation of the plugin
>> buffer if you simply want to juggle a lot of memory buffers. However
>> I still recommend to always use static allocation and thus always run
>> the worst case.
>>
>> --
>> Björn
>
>
> I'll take your advice and just put a finite limit on my array ...32K -
> my_plugin should be sufficient :) ...dynamic plugin buffer sounds
> like a lot of work for one plugin! ;)


BTW, you can get the remaining buffer space not being used by your
plugin by calling plugin_get_buffer().

-Hardeep
Received on 2004-01-09

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy