>At the end of the display:
>Heap Summary:
>
>  flags:              8000             (What does this represent?)

Probably the heap Flags.. you can read about these in the Memory Manager Docs.

>  size:               1E7EF2   (Total size of the heap?)

Well, it's about 2Meg - 96k, so I'd say yes, and you're on a Palm V. Am I
right? Maybe a 3... I can't remeber if they bumped the dynamic heap to 96k
in the III or in OS 3.1... But I think it was 3.1.

>
>  numHandles:         #200             (Total number of handles...in use?
>Available?)

Dunno... doesn't matter TOO much for you.

>  Free Chunks:        #12     (1E58FE bytes)

>               (Does this number represent the total amount of free memory
>in the
>heap?  If there's a memory leak, is this where I should see memory
>decrease over time?)

This is how much FREE SPACE there is in the heap. I don't know what the #
is exactly.

>  Movable Chunks:     #51     (0022C4 bytes)
>
>               (These chunks are movable.  Are they free?  Or could they
>be in use,
>but still movable?  What would an increasing/decreasing # mean?)

This is how many HANDLES there are allocated. MOVABLE chunk. DmNewRecord,
DmNewHandle.

>
>  Non-Movable Chunks: #0      (000000 bytes)

This is how many NON-MOVABLE Chunks (pointer-based chunks, MemPtrNew) are
allocated. Since this is a DATA heap, there are NONE.

>1) Is it safe to run heap commands like hd or ht while my application is
>running?  I've found that this can make CodeWarrior unstable...am I doing
>something incorrectly?  What about while Gremlins are running?  Or should I
>do this before the app is loaded?

I have noticed instability in doing this if my app isn't 'idle'. I always
STOP gremlins temporarily.

>
>2) Using the console, then debugging, then recompiling with changes and
>using the console again can render the whole IDE unstable.  Am I missing
>something here?  If I close the console before re-compiling, it's usually
>fine.

Dunno.

>3) Do I have to mess with the settings of mdebug before using heap
>commands?  Why?
>
>4) What is hchk actually checking?  And are hchk's results based on
>mdebug's settings?

I think it checks the flags and makes sure the heap isn't corrupt. It gets
called automatically by MDEbug if heap check is activated. Do a MDebug to
see the current settings.

>5) Occasionally, I'll get a message that the heap is corrupted.  For
>example, if there's a FrmHandler in a loop that
>creating/locking/unlocking/freeing handles and I issue "ht 0", I sometimes
>get a "corrupted heap" message:
>
>#ERROR: Invalid Handle field
>#### ERROR: Heap Corrupted!! #####
>
>I assume that this is because the hd is issued at some inappropriate time
>in the loop relative to the state of handles.  What is this "corrupted
>heap" message referring to?  Under/overlocked handles?  Bad pointers?  And
>how does it make this determination?
>
>5) mdebug's primary function seems to be to make the IDE unstable. ;-)  Is
>this normal?  mdebug -min seems like a useful thing to use, given that
>we've been talking about the minimum space on the dynamic heap.  But using
>it can cause an "Unhandled Exception" error in the IDE, not unlike the
>infamous error about Palmrez in CWR5 before the patch was issued.  I must
>be missing something.

Yes, i"ve noticed this, too. I do my MDEBUG testing on an actual device.
It'd be sweet if it worked better in POSE.


Alan Pinstein
Synergy Solutions, Inc.
http://www.synsolutions.com
1-800-210-5293



Reply via email to