Automatic Persistence, Method 2
  • Overload new() with allocation from internally managed pages of memory.
  • Small bitmap (1/32 of each page) records positions used by all pointers.
  • When storing data to disk, entire pages move to disk without fragmenting to individual objects.
  • When restoring data from the disk, pointers marked in the bitmap must be converted.
  • When pages are of size 2**n, the conversion takes only several arithmetic operations.