it appears as though the fist 19XX positions are nulled out, but the last
few positions have some garbage in them... which I try to overwrite, which
causes the error.

how do I allocate some memory, clear it out, and then set my variable type
to use it???

I know how to do this with records, but not with simple variables in
memory...


thanks!


On Mon, 29 Jan 2001 [EMAIL PROTECTED] wrote:

> 
> 
> > #define NAME_SIZE  25
> > #define TITLE_SIZE 25
> > #define DETAIL_SIZE 1000
> > #define RECORD_SIZE (NAME_SIZE + TITLE_SIZE + DETAIL_SIZE + 3)
> >
> >
> > typedef struct{
> >    char name[NAME_SIZE + 1];
> >    char title[TITLE_SIZE + 1];
> >    char detail[DETAIL_SIZE + 1];
> > }TestType;
> 
> 
> This is a poor way to get the size of a record.  Just use:
> 
>      #define RECORD_SIZE (sizeof(TestType))
> 
> 
> > ...
> > this is where I think the "writting directly to unallocated chunk"
> > happens.
> 
> Why don't you just click on the Debug button in the error dialog and remove all
> doubt as to where it happens?
> 
> -- Keith Rollin
> -- Palm OS Emulator engineer
> 
> 
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe, please see 
>http://www.palmos.com/dev/tech/support/forums/
> 


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

Reply via email to