diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-12-16 12:02:23 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-12-16 12:02:23 +0000 |
| commit | 3811ff53a60cc6e7277e5de98e696a9a76c36a9e (patch) | |
| tree | cfb0da4caac5d843a3d9c9d03d5ab2a9ccd12839 /runtime/src/alloc.c | |
| parent | b59c72a2a7f0f128b38f48d50e37630cc90dfe20 (diff) | |
Extract alloc.{h,c}
Diffstat (limited to 'runtime/src/alloc.c')
| -rw-r--r-- | runtime/src/alloc.c | 15 |
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); +} |
