Commit Graph

3 Commits

Author SHA1 Message Date
Josh Stone
c44e55b90e emmalloc: use __heap_end instead of sbrk(0) (#462) 2024-06-25 12:13:35 +02:00
Dan Gohman
a7af7c064b Port emmalloc to wasi-libc.
- Avoid using Emscripten-specific functions
 - Avoid using a constructor.
 - Add support for allocating memory at `__heap_base`.
 - Adjust the max-align value.
 - Disable functions that wasi-libc doesn't currently publish.
 - Add `__libc_` aliases.
2022-11-01 12:54:26 -07:00
Dan Gohman
f8eaf0028c Beginning porting Emscripten's emmalloc to wasi-libc.
emmalloc.c is derived from Emscripten at this path here:

https://github.com/emscripten-core/emscripten/blob/main/system/lib/emmalloc.c
2022-11-01 12:54:26 -07:00