my application opens 6 databases. at this stage, the record size is
predetermined for my data. as long as I keep the record size somewhere
between 1000-2000 bytes, things work fine. but, if I try to create a
record larget than that, emulator warns that is has just written directly
to an unallocated chunk of memory, and then eventually gets a stack
overflow.
here is the jist of it:
#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;
then, the databse is opened fine,
testDB = DmOpenDatabaseByTypeCreator('DATA','XXXX',dmModeReadWrite);
then, in an init function I try to create a new record pointer
VoidHand h = DmNewRecord(testDB, &index, RECORD_SIZE);
and then clear the bits and write in some strings
this is where I think the "writting directly to unallocated chunk"
happens.
any ideas?? I need to have records that might be larger than 1000 bytes!
thanks!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/