This document tries to establish a mathematical formulation for GC pacing in Luau GC, assuming a uniform rate of allocation in an application with steady live set.
GC algorithm assumptions
- GC proceeds in three phases: mark, atomic, sweep
- During mark, the heap size only grows as we don't deallocate memory short of table resize
- During sweep, the heap size grows due to new allocations and shrinks due to swept objects
- Live set is fixed at atomic time (between mark & sweep)