Add wasm_export.h APIs to expose memory type (#3496)
Support to get `wasm_memory_type_t memory_type` from API `wasm_runtime_get_import_type` and `wasm_runtime_get_export_type`, and then get shared flag, initial page cout, maximum page count from the memory_type: ```C bool wasm_memory_type_get_shared(const wasm_memory_type_t memory_type); uint32_t wasm_memory_type_get_init_page_count(const wasm_memory_type_t memory_type); uint32_t wasm_memory_type_get_max_page_count(const wasm_memory_type_t memory_type); ```
This commit is contained in:
@ -1219,7 +1219,7 @@ create_memory_info(const AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||
/* Load memory base address */
|
||||
#if WASM_ENABLE_SHARED_MEMORY != 0
|
||||
is_shared_memory =
|
||||
comp_ctx->comp_data->memories[0].memory_flags & 0x02 ? true : false;
|
||||
comp_ctx->comp_data->memories[0].flags & 0x02 ? true : false;
|
||||
if (is_shared_memory) {
|
||||
LLVMValueRef shared_mem_addr;
|
||||
offset = I32_CONST(offsetof(AOTModuleInstance, memories));
|
||||
|
||||
Reference in New Issue
Block a user