I'm looking to tighten up my code to avoid getting surprised by any memory
errors that occur, and found the MemSetDebugMode() function. However, I
can't find any detailed documentation. I can guess at the meaning of some
of the flags, but not all of them:
memDebugModeFillFree
memDebugModeAllHeaps
I guess that these modes fill memory with a defined value that will be both
noticeable and result in an error if executed, for example 0x55. I assume
that FillFree means that free'd chunks will be filled with this value.
However, I'm not clear what AllHeaps means.
memDebugModeScrambleOnChange
memDebugModeScrambleOnAll
I assume this refers to moving all the handles in a heap, to mess up any
pointers still referencing the heap that may continue to work if the memory
is not overwritten. However, I'm not sure what OnChange and OnAll mean
exactly.
memDebugModeCheckOnChange
memDebugModeCheckOnAll
Here I'm not sure what this means. My best guess is that MemHeapCheck() is
called at some point. But I don't know what happens if the check fails -
does it do ErrFatalDisplayIf(MemHeapCheck()) ? Also, once again, I'm not
sure what OnChange and OnAll refer to.
memDebugModeRecordMinDynHeapFree
I assume this records the minimum dynamic heap space. However, I don't know
where it's stored, or how long it tracks this - just for the lifetime of an
applications instantiation? or once turned on it just keeps going?
Can someone point me to some detailed documentation on this area, or provide
an accurate detailed description of what each flag means?
Also, how do these modes work in conjunction with CW's debugger (for example
which seems to fill with 0x55 itself), and with POSE's own checks?
Thanks in advance,
Cheers,
Russell
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/