Hi all,
I'm writing an app in which at a point I have to save the index
numbers of some of the databases and then use them.
I use the following method to resize the memory allocation...
if (hBooksIndex == NULL)
{
if((hBooksIndex = MemHandleNew(sizeof(UInt)))==NULL)
TerminateApp();
}
else
if(MemHandleResize(hBooksIndex,nBooks*sizeof(UInt))==memErrNotEnoughSpace)
TerminateApp();
pUInt = (UInt*)MemHandleLock(hBooksIndex);
pUInt[nBooks-1] = (UInt) i;
MemHandleUnlock(hBooksIndex);
This method works fine but breaks under palmOS 3.3 when I tap on the
Applications Icon saying that the app is trying to access an unalocated
chunk of memory.
and under palmOS VII EZ it breaks up after some 6,000 events, saying that
MemHandleResize has failed. Can anybody throw some light on what is
happening.
By the way, on PalmOS 3.0 it passes through 224,000 events before breaking.
Is there a better way to code the above given segment ??
Prashant.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html