Skip to content

Implement a nop GC (like Java Epsilon) #18

Open
@Techcable

Description

@Techcable

This would be super useful for testing.

See details Java Epsilon GC for how it might be used in production.
The nice thing about using this with Rust's ownership model is that collectors could safely be disposed of.
Once all the references are gone, you can clear the arena and reuse it for other tasks.

Essentially this would make it an arena allocator that conforms to the zerogc interface. That would be super cool!
Let's say one day you decide the overhead of GC isn't worth it. If your tasks are short running enough (1-2 ms) and only allocate a couple of MB of memory, it'd be silly to collect them. Simply throw away the collector and reuse the memory for the next task.

I have a temporary implementation (for unit tests) in 772ffbd
However, when we finally get the real one, I think this should be a separate crate even though it would complicate testing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions