FYI, using the Palm OS Emulator pretty much obviates the need for 
something like MemSetDebugMode.  Poser will warn you when you access 
unlocked or unused memory chunks, so filling them with magic values 
doesn't get you anything.  Scrambling memory is another way to help 
ensure an application's robustness, but again, that's intended to 
highlight problems with stale pointers, something that Poser does 
better.

Poser 3.4 will also detect and report memory leaks.  I'm still trying 
to get that out the door...  :-)

-- Keith Rollin
-- Palm OS Emulator engineer

At 11:45 AM -0500 12/13/01, Avilla, Dane wrote:
>Hi Russell,
>
>Take a look at the article on "Tips for finding invalid handles":
>
>http://oasis.palm.com/dev/kb/papers/1383.cfm
>
>When debugging memory leaks/errors, I've found it useful to take a look at
>the following KB article on tracking heap availability:
>
>http://oasis.palm.com/dev/kb/papers/1930.cfm
>
>I've found it's code to be very helpful in tracking down memory errors.
>Using the heap dumping mechanism detailed in the article, you should be able
>to locate your memory leaks quickly. 
>
>Hope this helps,
>
>-DGA
>
>>  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.
>>
>  > <snip>

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

Reply via email to