Hi I repeat what was said in this forum within a few last days:
Look at the threads "POSE reports memory leak even when I don't allocate" and "Memory leaks". Read http://www.fifthgate.org/articles/palm_mem_leaks.html In addition to this article you can use different technique: Replace every allocated block by header+block: Your alloc function will return pointer to the block, which is actually in the middle of the allocated memory. Header can contain (part of) __FILE__/__LINE__ info. Then it is easy to check emulator log whenever he announces some memory problem. This procedure is easier and faster than the one described in the http article, but will take more memory. In the old days I used to use it in even more complex form: the block had also a short suffix (say 16 bytes), which were filled with a specific value (non-zero). Then, when the memory is freed, you can check if this memory is corrupted. We stopped using this technique when VC++ offered it, too. But I am not sure if things like this can happen on Palm, because I don't know heap internals. Jan Slodicka ----- Original Message ----- From: "David McNab" <[EMAIL PROTECTED]> > Hi, > > What tools and tricks are available for hunting memory leaks on the > Palm? > > Much of my concern relates to the fact that the OS manual is less than > explicit about cleanup of allocated memory. > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
