At 11:01 PM -0400 5/4/99, George A. Madrid wrote:
>The Debug Console feature in CWIDE allows me to perform a 'hd' command.
>This command dumps all of the chunks in a heap out to the screen. At the
>end of each line in this list (right after the flags field) is what appears
>to be a tag of some kind that lets you know what type of chunk it is. Where
>does this information come from, and how can I define it for my own memory
>allocations?
>
>I'm trying to track down a memory leak, and this capability would be
>incredibly useful. For example, it told me that several of the chunks were
>DmOpenRef structures for the same db, so I knew that I was failing to call
>DmCloseDatabase and found the problem in a matter of minutes.
This information is built-in to the Debug Console (which is based on
code from the Palm Debugger application). Neither one is extensible
in terms of providing your own ability to provide chunk information.
Most of the chunks that Palm OS(TM) knows about are labeled for you,
which should leave very few "unknown" chunks. The unlabeled chunks
are almost always chunks that have been allocated (directly or
indirectly) by your application.
--Steve