aboutsummaryrefslogtreecommitdiff
path: root/runtime/src/alloc.c
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2023-12-16 12:02:23 +0000
committerMichael Williamson <mike@zwobble.org>2023-12-16 12:02:23 +0000
commit3811ff53a60cc6e7277e5de98e696a9a76c36a9e (patch)
treecfb0da4caac5d843a3d9c9d03d5ab2a9ccd12839 /runtime/src/alloc.c
parentb59c72a2a7f0f128b38f48d50e37630cc90dfe20 (diff)
Extract alloc.{h,c}
Diffstat (limited to 'runtime/src/alloc.c')
-rw-r--r--runtime/src/alloc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/runtime/src/alloc.c b/runtime/src/alloc.c
new file mode 100644
index 00000000..f7972fbf
--- /dev/null
+++ b/runtime/src/alloc.c
@@ -0,0 +1,15 @@
+#include "./std/unistd.h"
+
+#ifdef __WASM__
+
+void* malloc(unsigned long);
+
+#else
+
+#include <stdlib.h>
+
+#endif
+
+void* shed__runtime__alloc(size_t size) {
+ return malloc(size);
+}