move to meson for build system
This commit is contained in:
parent
fdd1ee61b5
commit
9616fb616e
28 changed files with 123 additions and 24 deletions
31
gc.h
31
gc.h
|
|
@ -1,31 +0,0 @@
|
|||
#ifndef GC_H
|
||||
#define GC_H
|
||||
|
||||
#include "common.h"
|
||||
#include "object.h"
|
||||
|
||||
#define GC_DEBUG 1
|
||||
#define HEAP_BYTES (4 * 1024 * 1024)
|
||||
|
||||
typedef struct Gs {
|
||||
U8 *start, *end;
|
||||
U8 *free;
|
||||
} Gs;
|
||||
|
||||
typedef struct Gc {
|
||||
Gs from, to;
|
||||
struct {
|
||||
O **items;
|
||||
Z count, capacity;
|
||||
} roots;
|
||||
} Gc;
|
||||
|
||||
V gc_addroot(Gc *, O *);
|
||||
I gc_mark(Gc *);
|
||||
V gc_reset(Gc *, I);
|
||||
V gc_collect(Gc *);
|
||||
Hd *gc_alloc(Gc *, Z);
|
||||
V gc_init(Gc *);
|
||||
V gc_deinit(Gc *);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue