Skip to content

Commit

Permalink
[wasm] Expose malloc
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Mar 16, 2024
1 parent 728dc90 commit e90c089
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions miniClib/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e90c089

Please sign in to comment.