On Sat, 15 Nov 2003 07:06:19, Wolfgang Spraul writes: > I have terrible > problems with fragmentation, especially on the dynamic heap, _especially bad_ > with nonmovable chunks.
This is the way all non-virtual-memory allocators work. You need to allocate all your non-moveable chunks all at once before allocating any moveable or temporary chunks if you don't want fragmentation. Large allocations work fine if you allocate your large chunk first. By doing this you can then reliably get almost all the dynamic heap that is available. And if you have special allocation needs, you can also allocate almost all of the dynamic heap at app startup, and run your own memory allocator inside of this chunk. Just use macro's to redirect all malloc's to your own routines. YMMV. Ron Nicholson HotPaw Productions http://www.hotpaw.com/rhn/palm -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
