• Jim Fulton's avatar
    We recently added estimated_size. We originally added it as a new · 7f5dda11
    Jim Fulton authored
    unsigned long field after a signed char state field and a 3-character
    reserved field.  This didn't work because there are packages in the
    wild that have their own copies of cPersistence.h that didn't see the
    update.
    
    To get around this, we used the reserved space by making
    estimated_size a 24-bit bit field in the space occupied by the old
    3-character reserved field.  To fit in 24 bits, we made the units of
    estimated_size 64-character blocks.  This allows is to handle up to a
    GB.  We should never see that, but to be paranoid, we also truncate
    sizes greater than 1GB.  We also set the minimum size to 64 bytes.
    7f5dda11
BTreeModuleTemplate.c 17 KB