mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-08-24 16:24:47 +03:00
add emscripten WASM support; this PR #822 written by Alon Zakai @kripken
This commit is contained in:
parent
bccf10e164
commit
d21f60f712
2 changed files with 254 additions and 0 deletions
|
@ -18,6 +18,9 @@ terms of the MIT license. A copy of the license can be found in the file
|
|||
#define MI_USE_SBRK
|
||||
#include "wasi/prim.c" // memory-grow or sbrk (Wasm)
|
||||
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
#include "emscripten/prim.c" // emmalloc_*, + pthread support
|
||||
|
||||
#else
|
||||
#include "unix/prim.c" // mmap() (Linux, macOSX, BSD, Illumnos, Haiku, DragonFly, etc.)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue