Skip to content

Simple: "small object arenas" never shrink #6

Open
@Techcable

Description

@Techcable

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).....

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugimpl-simpleThe simple mark/sweep collector (our first one :D)memory-usageThe garbage collector is wasting memory (Java)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions