Commit 1bf1137
mimalloc: add a hack to fix building for Emscripten
We currently use the dlmalloc allocator as a system allocator, and only
use mimalloc for the temporary heap.
Unfortunately, the Emscripten port of mimalloc assumes that it's used as
a system allocator and depends on the slow emmalloc for low-level access
to memory allocation.
Short of converting to mimalloc as a system allocator as well, our only
other option is to enable emmalloc as a system allocator, but that would
really slow things down everywhere. As a result, we're forced to use an
ugly hack and override the symbol names, so they point to the allocator
in use, rather than hard-coded to emmalloc.1 parent c34d232 commit 1bf1137
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
214 | 226 | | |
215 | 227 | | |
216 | 228 | | |
| |||
0 commit comments