At 8:17 AM -0800 4/10/99, Andrew Ball wrote:
>I'm intuiting from Roger's suggestion in an earlier post that the dynamic
>heap can't be crowded out by the storage heap (wild guess...not fact
>based).  The intent is that the dynamic heap should always have room for
>basic OS stuff, forms, battery warnings, alarms, menus
>_no_matter_what_an_app_is_doing.  Please correct me if this assumption is
>wrong.

The storage heap and the dynamic heap sizes are fixed.  No matter how much
storage heap you use (or have left), you still have a fixed size dynamic
heap.

Certainly the *intent* is that there should always be enough dynamic heap
for OS stuff.  However, it's relatively easy to write an application that
allocates a lot of dynamic heap for itself (using MemPtrNew or
MemHandleNew) and thus starves the OS.  In fact, using too much dynamic
heap is a fairly common beginning PalmOS programmer error.

Typically the new programmer won't even notice 'till they try to run their
app on a PalmPilot Personal, where there is less dynamic heap, and the app
suddenly runs out of memory.  Of course, this same app will cause problems
on a Pro, Palm III, etc. if the TCP/IP stack is running, but that's often
overlooked.

                                --Bob


Reply via email to