Skip to content

Does gc_start use unusual values? #66

Description

@richardhills

gc_start is:

void gc_start(GarbageCollector* gc, void* bos) { gc_start_ext(gc, bos, 1024, 1024, 0.2, 0.8, 0.5); }

So that downsize_load_factor is 0.2, upsize_load_factor is 0.8 and sweep_factor is 0.5

If I have interpreted this correctly, if you genuinely have, say, 60% of allocations used and reachable, this will cause a sweep to run with each new allocation, until eventually you get to 80% of allocations used, when it will finally increase the capacity.

I suspect the actual configuration should be gc_start_ext(gc, bos, 1024, 1024, 0.2, 0.5, 0.8); so that we sweep at 80%, and upsize if we can't get allocations back below 50% after a sweep.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions