[instantiation linking] create and import WASMMemoryInstance for interp#3845
Merged
lum1n0us merged 27 commits intobytecodealliance:dev/instantiate_linkingfrom Nov 4, 2024
Merged
Conversation
62b7808 to
1821dfd
Compare
lum1n0us
commented
Oct 15, 2024
a1d2c27 to
7678f4d
Compare
…ealliance#3871) * exclude fuzz test for scoreboard scan * ci ignore osv-scanner.toml file name inconsistency
…lds (bytecodealliance#3872) Co-authored-by: Deniz Sokmen <dsokmen@amazon.com>
including - memory create and destroy - instnace_new with imports
Besides, it is still an open question if a memory should be exported
This commit refactors the `memory_deinstantiate` function in the `wasm_runtime.c` file. It introduces a new helper function `memory_deinstantiate` to handle the destruction of memory instances. The function checks if the memory is shared and decrements the reference count before freeing the memory. It also destroys the heap handle and deallocates the linear memory. Additionally, the commit fixes the `wasm_destroy_memory` function by calling the `memory_deinstantiate` function and freeing the memory instance. These changes improve the memory management in the interpreter and ensure proper destruction of memory instances.
- Set CMAKE_BUILD_TYPE to Debug in CMakeLists.txt - Add missing printf and fflush statements in import_memory.c - Add assertion for memory data in import_memory.c - Add assertion for memory growth in import_memory.c
…i-threads, and thread_manager.c
Both `WASI_THREADS` and `THREAD_MGR` continue to use loader linking to keep a separate memory instance for each thread they create.
wenyongh
reviewed
Oct 28, 2024
bf28734 to
f29a36e
Compare
wenyongh
reviewed
Oct 29, 2024
f29a36e to
3a8b5a6
Compare
7c81eb8 to
fbba2a3
Compare
fbba2a3 to
00fec83
Compare
cc33703 to
c3efbbb
Compare
… for samples/file
lum1n0us
commented
Nov 1, 2024
lum1n0us
commented
Nov 1, 2024
lum1n0us
commented
Nov 1, 2024
lum1n0us
commented
Nov 1, 2024
This was referenced Nov 3, 2024
wenyongh
reviewed
Nov 4, 2024
lum1n0us
added a commit
to lum1n0us/wasm-micro-runtime
that referenced
this pull request
Feb 19, 2025
…rp (bytecodealliance#3845) APIs to create and import WASMMemoryInstance for Interp - add a demo (sample/linking/raw) for APIs test - new APIs for instances of spawned threads to build imports list from parents'
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.
No description provided.