Repository navigation
[mimalloc] Disable profiling and nonessential stats - #28084
Merged
Merged
Conversation
Set `MI_PROFILE=0` and `MI_STATS=0` to reduce code size by disabling profiling and nonessential statistics. Define `MI_NO_GETENV` in preparation for upstream mimalloc support, as Emscripten already does not support environment customization.
Collaborator
Author
Tested with: $ ./test/runner {core2,wasmfs,wasm64_4gb}.test_wrap_malloc_mimalloc other.test_malloc_size_mimalloc* other.test_malloc_multithreading_mimalloc* other.test_mimalloc_options
Running 8 tests
Using 8 parallel test processes
[8/8] test_malloc_size_mimalloc_O2 (test_other.other.test_malloc_size_mimalloc_O2) ... ok
----------------------------------------------------------------------
Ran 8 tests in 1.157s
OK
Total core time: 3.791s. Wallclock time: 1.157s. Parallelization: 3.28x. |
There was a problem hiding this comment.
Code Review
This pull request reduces the code size of the mimalloc library by disabling environment customization, profiling, and nonessential statistics via compiler flags (-DMI_NO_GETENV, -DMI_PROFILE=0, and -DMI_STATS=0). Consequently, the expected code sizes in test_other.py and the expected output in test_mimalloc_options.out have been updated to reflect these changes. There are no review comments, so no feedback is provided.
sbc100
approved these changes
Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Set
MI_PROFILE=0andMI_STATS=0to reduce code size by disablingprofiling and nonessential statistics.
Define
MI_NO_GETENVin preparation for upstream mimalloc support,as Emscripten already does not support environment customization.