----- Original Message ---- > From: Dennis Cote <[EMAIL PROTECTED]> > To: sqlite-users@sqlite.org > Sent: Wednesday, May 30, 2007 12:09:25 PM > Subject: Re: [sqlite] sqlite internal structs don't make use of C bitfields?
> You may want to look at how the isInited field is used. You may be able > to combine it with the others as long as it stays in the first byte and > the code only checks for zero vs nonzero values on that byte (then again > that may not be safe if other combined bitfield are set nonzero before > the isInited field is set). If its safe, you could save another byte per > structure. There seems to be some other removal of redundant fields: u8 childPtrSize; /* 0 if leaf==1. 4 if leaf==0 */ implies that "leaf" can be replaced by "!childPtrSize", right? Well, on the bitfield version, it's only saving 1 bit (we can go the other way and replace childPtrSize by something like leaf?0:4 and save more space). hdrOffset seems to be an other interesting subject as it seems to be the same kind of deal. Nicolas