Skip to content
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

Refactor shared heap feature for interpreter mode #3794

Merged

Conversation

wenyongh
Copy link
Contributor

No description provided.

if (heap) {
mem_allocator_free(heap->base_addr, addr);
if (memory->is_memory64) {
if (ptr < shared_heap->start_off_mem64)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If native addr is not in shared heap, it's better to throw an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}

#if WASM_ENABLE_SHARED_HEAP != 0
if (is_app_addr_in_shared_heap(module_inst_comm, memory_inst->is_memory64,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the app_offset is in shared heap, it's seems that the check will go to fail at line 659, and is_app_addr_in_shared_heap will not work. Move this before line 657?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, thanks, done.

@wenyongh wenyongh merged commit 5e20cf3 into bytecodealliance:dev/shared_heap Sep 18, 2024
383 checks passed
wenyongh added a commit to wenyongh/wasm-micro-runtime that referenced this pull request Sep 19, 2024
Refactor shared heap feature for interpreter mode (bytecodealliance#3794)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants