Description
This is actually not uncommon among garbage collected programs (Eclipse),
but our collector should strive to do better.
Potentially we could allocate a bunch of objects into an arena, requiring bumpalo
to create a new chunk of memory.
Hypothetically a program could stop using the old objects, then never allocate any again (or at least not as many).
Right now, the sweep phase will simply add free objects to the free lists and never attempt to return it to the OS. Even if a chunk of memory is completely empty, we'll still never return it.
In a way, this is related to our dependency on bumpalo
since they don't provide an interface to free a single chunk at a time.
Fragmentation of the arenas could also leave a ton of unused memory, resulting in a similar situation. That situation would require a compaction phase, which is out of scope for the simple allocator (just disable the arenas if this is a problem).....