Implemented free chunk swaps and filtering

This commit is contained in:
Victor Olin 2023-02-18 13:31:16 +01:00
parent b79a83c32a
commit 99c69dbd57
3 changed files with 49 additions and 14 deletions

View file

@ -15,6 +15,8 @@
#define FREE (uint) 0x4
#define COLLECT_ALL (uint) 0x7
#define FREE_THRESH (uint) 20
namespace GC {
class Heap {
@ -29,6 +31,8 @@ namespace GC {
void collect();
void sweep();
void free();
void free_overlap();
// void compact();
void mark(uintptr_t *start, const uintptr_t *end, std::vector<Chunk *> worklist);
void print_line(Chunk *chunk);