diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-12-16 14:48:29 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-12-16 14:48:29 +0000 |
| commit | cc371de042fce702a849ecc03b76c552bf81d114 (patch) | |
| tree | 98938b35be4ba32a2347fadd1eb10ab6dfd8ac65 /runtime/src | |
| parent | 08352d48adf0052fb7fe1ca6690af4381a1dae2a (diff) | |
Add shed__runtime__gc_alloc()
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 |
