Hi,
I am having a problem with memory, I think. I keep getting a fatal error
when I run
this code:
CRawHist *rawhistData = MemPtrNew(sizeof(CRawHist));
datain2* phistrec;
CharPtr chrtnbuf1;
int ndatasize;
char strint_buf[400];
int nmemcount;
ndatasize = 288;
phistrec->count1 = 18;
nmemcount = 16;
chrtnbuf1 = ReceiveSerial( ndatasize/2, 60 );
// Move information into a variable.
MemSet(&strint_buf, sizeof(strint_buf), 0x00);
MemMove(&strint_buf, chrtnbuf1, ndatasize/2);
// populate an array with the same information.
for( i=0; i<=(phistrec->count1/2)-1; i++ )
{
MemSet(&rawhistData[i].vtm1, 16, 0x00 );
MemMove(&rawhistData[i].vtm1, &strint_buf[i*nmemcount], 16);
if( rawhistData[i].vtm1 <= 10 )
{
break;
}
nrecord_no++;
}
MemPtrFree( rawhistData );
Am I doing this correctly? This code seemed to work fine for a while. I
fixed something totally
unrelated then recompiled and now it fails in this code.
Thank you for your help.
John
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/