From e90c089e7ecafba9cbf2b160ebf91cf76ef8b37e Mon Sep 17 00:00:00 2001 From: Robert Konrad Date: Sat, 16 Mar 2024 18:09:45 +0100 Subject: [PATCH] [wasm] Expose malloc --- miniClib/memory.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/miniClib/memory.c b/miniClib/memory.c index a90991765..29fb213c3 100644 --- a/miniClib/memory.c +++ b/miniClib/memory.c @@ -8,6 +8,9 @@ static unsigned char heap[HEAP_SIZE]; static size_t heap_top = 4; #endif +#ifdef KORE_WASM +__attribute__((export_name("malloc"))) +#endif void *malloc(size_t size) { #ifdef KORE_WASM // Align to 4 bytes to make js typed arrays work