feat: add wasm_memory_get_init_page_count()#4110
Closed
Jiax-cn wants to merge 1 commit intobytecodealliance:mainfrom
Closed
feat: add wasm_memory_get_init_page_count()#4110Jiax-cn wants to merge 1 commit intobytecodealliance:mainfrom
Jiax-cn wants to merge 1 commit intobytecodealliance:mainfrom
Conversation
loganek
reviewed
Feb 24, 2025
| == 13 * sizeof(uint64) + 128 + 14 * sizeof(uint64)); | ||
|
|
||
| bh_static_assert(sizeof(AOTMemoryInstance) == 120); | ||
| bh_static_assert(sizeof(AOTMemoryInstance) == 128); |
Contributor
There was a problem hiding this comment.
this change makes me think whether we're not breaking the ABI here?
Contributor
|
IMU, we can always obtain the initial page value from a memory type of a module rather than from the memory of an instance. WASM_RUNTIME_API_EXTERN void
wasm_runtime_get_export_type(const wasm_module_t module, int32_t export_index,
wasm_export_t *export_type);
WASM_RUNTIME_API_EXTERN uint32_t
wasm_memory_type_get_init_page_count(const wasm_memory_type_t memory_type); |
Contributor
Author
|
@lum1n0us This is useful, thank you. |
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.
This API provides access to the initial memory size, as a supplement to #3786.