-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[wasm] stop using mmap/munmap #108512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
[wasm] stop using mmap/munmap #108512
Conversation
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
0d68ed9 to
779fbac
Compare
kg
reviewed
Oct 8, 2024
kg
reviewed
Oct 8, 2024
kg
reviewed
Oct 8, 2024
kg
reviewed
Oct 8, 2024
kg
reviewed
Oct 8, 2024
kg
reviewed
Oct 8, 2024
kg
reviewed
Oct 8, 2024
This was referenced Oct 8, 2024
Closed
Member
Author
|
@radekdoulik could you please run startup benchmark on this PR ? Many thanks |
BrzVlad
reviewed
Oct 9, 2024
BrzVlad
reviewed
Oct 9, 2024
Member
|
there are visible regressions in json on firefox. I will schedule the updated commit to have another measurement at hand |
2ca1b24 to
5070e99
Compare
This was referenced Oct 17, 2024
Member
kg
reviewed
Oct 23, 2024
kg
reviewed
Oct 23, 2024
kg
approved these changes
Oct 23, 2024
Member
Author
|
/ba-g all CI issues are known |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
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.

Contributes to #108510
Fixes #107215
Context
sgenGC is usingmono_valloc->mmapon all other platforms.mmapemulator in emscripten andwasi-libcdoens't implement partialmunmapmallocrather than on top ofsbrk.mmapmunmapmallocpool.Changes
MS_BLOCK_ALLOC_NUMto1which preventssgenfrom doing partialmono_vfreeLOCK_FREE_ALLOC_SB_MAX_SIZEto16384 * 32to compensate for abovesgen_los_memory_usage_totalis accounting for alignmentmono_vfreeusingdlfreemono_valloc_alignedandmono_vallocusingposix_memalignsys_allocimplementation will stitch last segment to new memory allocated viasbrkmmapwhich always callsmemsetto zero the memorysbrkdon't need that.mono_vallocpassMONO_MMAP_NOZEROmono-wasm-pagemgr.candwasm-mmapoptionTODO