> >The problem is the dynamic heap.  I have tested on gremlins with all roms
> >and it runs fine on everything greater than the Personal.  It
> fails on the
> >Personal very quickly.  When it fails on the Personal, it is usually in a
> >constructor and the PalmPilot does not return control to my app
> gracefully.
>
>
> I'm not sure by what you mean by this.  What happens when the
> constructor fails?
> Since that's *your* code, the PalmPilot is not involved, and so
> it doesn't have
> any control to return to you.

Actually, I think this may be CW code.  It looks like the memory allocation
fails and the constructor never gets executed.  Before the 'new' returns,
the Palm displays an error message.  I don't remember the message as it has
been awhile but I think it was something about a null handle.  The only
thing I can think to do about this is to override the new operator and check
available memory before calling MemPtrNew.

> >I guess I could check for memory size but I would rather popup a
> message as
> >soon as the user enters the app on the Personal.  I have one user who has
> >reported that the crash corrupted his data.
>
>
> Well, checking for Professional vs. Personally still probably isn't a good
> check.  If the user has NetLib open for some reason, that will
> eat up 32K of
> heap on a Pro, still leaving you with the same amount of space
> that causes you
> to fail on a Personal.

Good point.  I have gone ahead and implemented a check for available memory.
If it is less than 12K I display an alert and bail out.  Thanks for the
idea.

Scott


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to