diff options
Diffstat (limited to 'runtime/src')
| -rw-r--r-- | runtime/src/gc.c | 5 | ||||
| -rw-r--r-- | runtime/src/gc.h | 4 |
2 files changed, 9 insertions, 0 deletions
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 <stdbool.h> #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 |
