Hi guys !
Here's a small update about dynamic memory management and the MiniXML parser:

On 14 Sep 2007, at 13:03, Daniel Weck wrote:
I may be a bit biased here, but one alternative for use is dbestfit:
 http://daniel.haxx.se/projects/dbestfit/
 http://sourceforge.net/projects/dbestfit/

Thanks, I'll take a look.

I have now totally switched from Doom's implementation to dbestfit (with the dmalloc+bmalloc solution).

I am currently testing my code against the simulator and the Gigabeat, and it works consistently. The crashes I experienced before were due to how static variables are loaded and kept alive when running and closing plugins in Rockbox. I have modified the memory management code to cater for that and added new initialization functions.

On a side note, bmalloc can allocate several non-contiguous memory pools, which could be nice for plugins which really need lots of memory (get_audio_buffer() + get_plugin_buffer()).

I can now concentrate on the XML parsing code, which works pretty well, bar some weird minor glitches which do not happen on the desktop-compiled version.

I am "cleaning" the mini-xml library to minimize the footprint and keep the functionality down to the strict necessary. I'm mostly interested in the SAX-like event system, whereby I can fully control whether/how the XML tree is built.

Cheers, Dan.

Reply via email to