David Korus <[EMAIL PROTECTED]> wrote:

>       I have an application that is somewhat memory intensive.  The
> problem is that the application seems to crash when trying to allocate some
> additional memory for one of the vectors I'm using.  Anyway, does anyone
> know the best way to monitor the amount of available memory on the palm
> (memory used for variables, vectors, etc.).

[ code deleted ]

Here's an idea. Since the memory allocation routines do return a null 
pointer if the allocation fails, can't you just do all of your memory 
allocations for a particular operation up front, and bail out if any of 
them fail? This may have the disadvantage of requiring more stack space 
(for local variables to hold the handles) if you're doing many separate 
allocations, but it should be very reliable.

--
Roger Chaplin
<[EMAIL PROTECTED]>

Reply via email to