> Check out the Programmer's Companion on the PalmOS web site
And while you're there, click on the link to "Writing Robust Code" and read the
part under "Use dynamic heap space frugally".
I'm not really sure how knowing the answer to Alan's question will help anyone
write more robust software, so I'm kind of worried that the wrong solution is
being taken to a problem. If you're working in a constrained environment like
the Palm OS dynamic heap, it's wrong to ask "OK, just how much heap is there?"
My feeling is the right question is: "How little of the dynamic heap can I take
up, and how should my application react when it can't get that room?" Because,
when it comes down to it, knowing how much room is supposed to be in the heap is
just theory. In practice, you could have more, you could have less. And
(heh...I started my sentence with a conjunction...William Forrester would be
proud...), as Alan found out, not all of that heap space is contiguous. It
could be highly fragmented. So knowing how much space should be there or is
there really doesn't buy you anything. You have to take the conditions as they
are and react accordingly.
Of course, I'm just speaking from a lofty Theory Chair myself. If anyone has
Practical Hammer to hit me over the head with, please feel free to go ahead and
pummel me with Reality. :-)
-- Keith Rollin
-- Palm OS Emulator engineer
"B. Cameron Lesiuk" <[EMAIL PROTECTED]> on 01/24/2001 08:23:27 PM
Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent by: "B. Cameron Lesiuk" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
cc: (Keith Rollin/US/PALM)
Subject: Re: Dynamic Heap Size..?
Check out the Programmer's Companion on the PalmOS web site
http://www.palmos.com/dev/tech/docs/palmos/Memory.html
You'll want to read the whole thing.
The chart you're looking for is near the very bottom.
-Cam
Alan Ingleby wrote:
> A) Is there a way to programmatically determine the Dynamic Heap size?
> B) Is these a chart which shows the Dynamic Heaps sizes for OS3.5 when
> installed on different machines, with different amounts of RAM?
>
> The reason I ask is that my program barfs when running on POSE due to
> insufficient dynamic heap under OS3.5 EZ ROM with 1 meg of RAM, but DOESN'T
> when running the OS3.5 Color EZ ROM on 1 Meg of RAM.
>
> Regards,
>
> Alan Ingleby
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/