wax wacky wrote:
IS there again a upper limit for memory allocation using MemGluePtrNew().

I am allocation a memory of 3MB using MemGluePtrNew(). But it returns NULL. why so ??????????

On every device, some portion of the memory is 'heap', and some of it is 'storage'. Heap memory is meant for use by the currently-running program, and it won't stick around; storage memory is meant for programs and data. Most of the memory on a unit is storage, while only a little bit of it is heap.

MemGluePtrNew allocates memory *on the heap*. Most devices don't have 3MB
of heap available. Thus, MemGluePtrNew returns NULL, meaning there wasn't
enough memory available. If you want to do a huge allocation, you can do
it, but you will have to do it in storage memory and use different
functions to manipulate it. You should only do this if you genuinely need
3MB, however, which you probably don't.


-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to