For some of our graphics intensive apps we allocate the big offscreen bitmaps when the program starts so we are sure we have a big enough contiguous block o' memory. If we allocate it when we actually need it, the memory is often too fragmented.

large enough CONTIGUOUS block of ram to allocate to you. have you
tried making a call to HeapCompact() or similar API's to shift things
around so that a large enough contiguous block is available?

Would MemHeapCompact ever be useful?


(from the api docs)
>Most applications never need to call this function explicitly. The system software calls this function at various times; for example, during memory allocation (if sufficient free space is not available) and during system reboot.


so... the system calls it when you try to allocate memory. in what situation would it be advantageous to call it explicitly?

>we have a trick on pre OS5  thats how we were able to have > 400k
of dynamic ram even on palmos 3.1  OS5 removed that ability, so, like
you, we were stuck with dynamic heap only

semaphore lock? But that works in OS5...so...uh...hmmm...oo, he's teasing us!


-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to