-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[wasm][coreclr] Disable remaining madvise calls on wasm #122920
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
[wasm][coreclr] Disable remaining madvise calls on wasm #122920
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request disables remaining madvise system calls for WebAssembly (WASM) targets across both CoreCLR and native libraries. WebAssembly doesn't support madvise operations, so these calls need to be conditionally compiled out to prevent runtime issues.
Key changes:
- Added
!defined(TARGET_WASM)guards tomadvisecalls in native I/O and CoreCLR memory management code - Introduced early return in
GCToOSInterface::VirtualResetfor WASM targets - Updated conditional compilation for memory advise operations in PAL mapping code
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/native/libs/System.Native/pal_io.c |
Added TARGET_WASM exclusion to MADV_DONTFORK conditional compilation and updated corresponding comment |
src/coreclr/pal/src/map/map.cpp |
Extended platform exclusion in MAPMarkSectionAsNotNeeded to also skip WASM targets alongside Android |
src/coreclr/gc/unix/gcenv.unix.cpp |
Added WASM guards to multiple madvise calls in VirtualDecommit and VirtualReset, with early return optimization for WASM in VirtualReset |
No description provided.