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

Update memory allocation functions to use allocator user data #4043

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lum1n0us
Copy link
Collaborator

fix #4024

Copy link
Collaborator

@loganek loganek left a comment

Choose a reason for hiding this comment

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

LGTM. Just a note here, should we add WASM_MEM_ALLOC_WITH_USER_DATA to a deprecation list and remove it on the next API break? Not sure if having this option disabled causes any performance issues, and I think we could improve the readability of the code by not having yet another configuration option.

@lum1n0us
Copy link
Collaborator Author

FYI: the initial concept

However, I agree with the idea of combining WASM_MEM_ALLOC_WITH_USAGE and WASM_MEM_ALLOC_WITH_USER_DATA. @dongsheng28849455 and @wenyongh , please share your thoughts.

@dongsheng28849455
Copy link
Contributor

I agree with the merger, and it need to be informed that the custom allocator may need to consider compatibility issue.

@lum1n0us
Copy link
Collaborator Author

@loganek about " add WASM_MEM_ALLOC_WITH_USER_DATA to a deprecation list". I observed that there are no definitions for malloc_func, realloc_func, and free_func in wasm_export.h. Therefore, we can't use the gcc deprecated attribute as we normally would to indicate deprecation. My thought is to revise the comments above malloc_func to reflect this, but I'm uncertain if that aligns with the deprecated list you were referring to. Please share your suggestions on how to proceed.

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.

Missing UserData in LinearMemory for custom allocator
3 participants