Hy, 
I'm finding very difficult to work with memory allocation on this platform... 
:-(
I'm trying to reallocate a memory chunk, and my code looks like this:

pDBName = (char**)MemPtrNew( sizeof( char*)*2); // i'm allocating memory for 
only 2 fields,

Char *name;
// then... in a while rutine:

name = (char*)MemPtrNew(appInfo.nameBufLen);
StrCopy(name,appInfo.nameP);
pDBName[*row]=name;
index++; // this keeps the curent no of fields allocated
if (index >2)
    MemPtrResize ( pDBName, sizeof(char*)*index); // the error that i'm caching 
here is "memory locked", but in the documations I read: "Call this routine to 
resize a locked chunk. "

What's the error is my code?

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

Reply via email to