Skip to content

Switch page allocation from reference counting to mark and sweep (or maybe tri-color) #94

@Bravotic

Description

@Bravotic

In our GC at the moment, memory pages are allocated and deallocated with reference counting for whether or not they are holding memory. This is not great, and is only now being used for testing. Lets get mark and sweep setup where when a memory location is saved in the GC (during the mark grey pass), it will set a flag on its page to not be collected. Then once the GC is done, it will quickly sweep the memory pages. This could also use tri-color but that might require more work. Since there are likely to be more variables (currently with admittedly very low numbers, there are 64 variable memory locations for every 1 page), page allocation collection being mark and sweep might not matter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions