diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-12-16 14:50:11 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-12-16 14:50:11 +0000 |
| commit | 61816e243a7f78415ff081c6d26ea9eaf83a6d29 (patch) | |
| tree | 434354b4c33a3088351e03aae0ef0c757b3cc612 /runtime/src | |
| parent | cc371de042fce702a849ecc03b76c552bf81d114 (diff) | |
Set mark of new GC objects
Diffstat (limited to 'runtime/src')
| -rw-r--r-- | runtime/src/gc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/src/gc.c b/runtime/src/gc.c index 413ffce9..6e3f0803 100644 --- a/runtime/src/gc.c +++ b/runtime/src/gc.c @@ -19,5 +19,7 @@ bool is_marked(struct ShedGcObjectHeader* object) { } void* shed__runtime__gc_alloc(size_t size) { - return shed__runtime__alloc(size); + struct ShedGcObjectHeader* object = shed__runtime__alloc(size); + object->mark = 0; + return object; } |
