From cc371de042fce702a849ecc03b76c552bf81d114 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 16 Dec 2023 14:48:29 +0000 Subject: Add shed__runtime__gc_alloc() --- runtime/src/gc.c | 5 +++++ runtime/src/gc.h | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'runtime/src') diff --git a/runtime/src/gc.c b/runtime/src/gc.c index 5c485b26..413ffce9 100644 --- a/runtime/src/gc.c +++ b/runtime/src/gc.c @@ -1,6 +1,7 @@ #include #include "./patio/patio.h" +#include "./alloc.h" #include "./gc.h" // The mark value for each object is initialized to 0. Each mark phase @@ -16,3 +17,7 @@ void alternate_mark_value() { bool is_marked(struct ShedGcObjectHeader* object) { return (object->mark & current_mark_value) == current_mark_value; } + +void* shed__runtime__gc_alloc(size_t size) { + return shed__runtime__alloc(size); +} diff --git a/runtime/src/gc.h b/runtime/src/gc.h index f8da17d3..e35481d1 100644 --- a/runtime/src/gc.h +++ b/runtime/src/gc.h @@ -1,6 +1,8 @@ #ifndef SHED_GC_H #define SHED_GC_H +#include "./std/unistd.h" + #include "./patio/patio.h" struct ShedGcObjectHeader { @@ -8,4 +10,6 @@ struct ShedGcObjectHeader { PatioInt mark; }; +void* shed__runtime__gc_alloc(size_t size); + #endif -- cgit v1.2.3