GetSizeInBytes estimates the memory usage of the Bitmap. Note that this might differ slightly from the amount of bytes required for persistent storage
()
| 472 | // GetSizeInBytes estimates the memory usage of the Bitmap. Note that this |
| 473 | // might differ slightly from the amount of bytes required for persistent storage |
| 474 | func (rb *Bitmap) GetSizeInBytes() uint64 { |
| 475 | size := uint64(8) |
| 476 | for _, c := range rb.highlowcontainer.containers { |
| 477 | size += uint64(2) + uint64(c.getSizeInBytes()) |
| 478 | } |
| 479 | return size |
| 480 | } |
| 481 | |
| 482 | // GetSerializedSizeInBytes computes the serialized size in bytes |
| 483 | // of the Bitmap. It should correspond to the |