aboutsummaryrefslogtreecommitdiff
path: root/runtime/src
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2024-03-19 16:09:59 +0000
committerMichael Williamson <mike@zwobble.org>2024-03-19 16:09:59 +0000
commit35b923b9f820653525a033f8ab2006ba1cb8c65c (patch)
tree3ff02a39feb4c82fee353c24574ad8c761450f00 /runtime/src
parent0a02c560a4835412630b3d016750c9edff857abe (diff)
Remove shed__runtime__alloc()
Diffstat (limited to 'runtime/src')
-rw-r--r--runtime/src/shed/alloc.c6
-rw-r--r--runtime/src/shed/alloc.h19
-rw-r--r--runtime/src/shed/gc/mark-and-sweep/gc.c2
-rw-r--r--runtime/src/shed/std/malloc.h15
4 files changed, 16 insertions, 26 deletions
diff --git a/runtime/src/shed/alloc.c b/runtime/src/shed/alloc.c
deleted file mode 100644
index f68fb128..00000000
--- a/runtime/src/shed/alloc.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "./std/unistd.h"
-#include "./alloc.h"
-
-void* shed__runtime__alloc(size_t size) {
- return malloc(size);
-}
diff --git a/runtime/src/shed/alloc.h b/runtime/src/shed/alloc.h
deleted file mode 100644
index 07a14436..00000000
--- a/runtime/src/shed/alloc.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef SHED_ALLOC_H
-#define SHED_ALLOC_H
-
-#include "./std/unistd.h"
-
-#ifdef __wasm__
-
-void* malloc(unsigned long);
-void free(void*);
-
-#else
-
-#include <stdlib.h>
-
-#endif
-
-void* shed__runtime__alloc(size_t size);
-
-#endif
diff --git a/runtime/src/shed/gc/mark-and-sweep/gc.c b/runtime/src/shed/gc/mark-and-sweep/gc.c
index e874157a..e6cbc0fa 100644
--- a/runtime/src/shed/gc/mark-and-sweep/gc.c
+++ b/runtime/src/shed/gc/mark-and-sweep/gc.c
@@ -1,9 +1,9 @@
#include <stdbool.h>
#include "../../../patio/patio.h"
-#include "../../alloc.h"
#include "../../gc.h"
#include "../../primitives.h"
+#include "../../std/malloc.h"
// == GC objects ==
diff --git a/runtime/src/shed/std/malloc.h b/runtime/src/shed/std/malloc.h
new file mode 100644
index 00000000..86b50826
--- /dev/null
+++ b/runtime/src/shed/std/malloc.h
@@ -0,0 +1,15 @@
+#ifndef SHED_STD_MALLOC_H
+#define SHED_STD_MALLOC_H
+
+#ifdef __wasm__
+
+void* malloc(unsigned long);
+void free(void*);
+
+#else
+
+#include <stdlib.h>
+
+#endif
+
+#endif