-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Description
Per Emscripten Compiler Settings , it is possible to omit any malloc implementation and provide your own. To reduce module size and improve efficiency, I would like to import malloc and free implementations; that way, modules don't have to all have their own copy of the allocator code, and heap overhead can live outside of WASM memory.
However, I can't find any way to safely do this. A custom allocator needs to know how Emscripten has laid out memory, and I can't find any options that will force it to export or import __heap_base, or documentation for how stack and heap memory are ordered, etc.
So, are there any examples of how to implement custom imported memory management functions?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels