emscripten-core / emscripten-core/emscripten

mimalloc adds >60kb into output artifacts

Open
#22,094 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

Using em++:

```
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.61 (67fa4c16496b157a7fc3377afd69ee0445e8a6e3)
clang version 19.0.0git (https:/github.com/llvm/llvm-project 7cfffe74eeb68fbb3fb9706ac7071f8caeeb6520)
Target: wasm32-unknown-emscripten
Thread model: posix
```

Adding `-s MALLOC=mimalloc` adds additional 52kb into .wasm and 9kb into .js outputs. Is that expected?

Example:

```sh
em++ main.cpp -s MALLOC=mimalloc -O3 -o wasm/mfcc.js
# produces: 60kb .wasm + 13kb .js
```

```sh
em++ main.cpp -O3 -o wasm/mfcc.js
# produces: 8kb .wasm + 4kb .js
```

Just checking, is that expected? Is the mimalloc so heavy?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.