I've been reading through the architives and seeing that this is likelybut
because I'm overwriting a chunk header, or something to that effect. My
apps pretty big, so I'm having a tough time tracking down where this might
be happening. When I make changes to the code, it sometimes goes away,it appears as though this is only because the bug is effecting lesscriticalparts of memory.
One approach for tracking memory overwrites is to add 'sentinel' markers to the beginning and end of each block and check these when you release the block (or at any other time you want to look for memory overwrite).
The mechanism for memory problem debugging is to write small
functions called something like DebugMemHandleNew,
DebugMemHandleFree, etc. These functions take the same parameters
as the system functions but do some extra stuff on each memory alloc
and release before calling the system functions. 'Extra stuff' varies
depending on the problem you're having, but it might be adding four
bytes of marker to the beginning and end of each allocated block, or
writing a log of each allocation and release (good for tracking lock/release
problems). You then create a C header that #defines MemHandleNew
to DebugMemHandleNew, etc for each function and add this header to
every C file in your project.
Thanks Chris, I definately need to do this.
Does anyone have this code posted somewhere or be willing to share it with me? To say that I'm under a time constraint, would be an understatement.
Thanks,
Rich
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
