Started working on a C wrapper

This commit is contained in:
Victor Olin 2023-03-29 08:31:34 +02:00
parent 3e9ed4e16b
commit ee53759ca5
3 changed files with 50 additions and 3 deletions

25
src/GC/lib/cheap.cpp Normal file
View file

@ -0,0 +1,25 @@
#pragma once
#include <stdlib.h>
#include "heap.hpp"
#include "cheap.h"
struct cheap {
void *obj;
};
cheap_t *cheap_the() {
cheap_t *c;
GC::Heap *heap;
c = (cheap_t *)malloc(sizeof(*c));
heap = &GC::Heap::the();
c->obj = heap;
return c;
}
void cheap_init() {
GC::Heap::init();
}