Carl,

I'm not sure how useful it is to be that picky.  But if you want to 
be *real* picky, have you found all such areas?  :-)  For instance, 
do you take into account the 6 or 8 byte chunk headers imposed by the 
Memory Manager?  Do you take into account the 4 byte entry in the 
master pointer table for handles?  Do you take into account the 
possibility that adding a new chunk to a database might cause a new 
master pointer table to be allocated?  Do you take into account any 
trailing padding bytes at the end of every chunk to make sure the 
following chunk is aligned properly?

If your answer to all of the above is "no", then I'm not sure that 
counting the 8 bytes you're thinking of is all that useful.  :-)

-- Keith


At 6:26 PM -0500 3/11/02, Carl Smith wrote:
>Just wondering if someone could clear this up for me.
>
>I want to check the size of my database, to limit it to a certain size, so
>when I call DmDatabaseSize and get back the 'totalBytesP,' field I want to
>compare this against my defined MaxSize. So I take the size of the new
>record, I'm about to add to the db, add it to the return value of
>'totalBytesP' and compare it to my MaxSize. My question is should I be
>adding 8 bytes for the record list's heaader. In the documentation at
>http://www.palmos.com/dev/support/docs/fileformats/Intro.html it states:
>"The Palm database header ends with a record list. The record list has its
>own header,..." Now does 'totalBytesP' include this 8 bytes or should I be
>adding it to my comparison value, as mentioned above, to get the total size
>of my 'to be' updated database? My first assumption is no.
>
>Any other thougths?
>
>Thanks
>Carl

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

Reply via email to