Implement a first version of shared heap feature (#3789)
ps. https://github.com/bytecodealliance/wasm-micro-runtime/issues/3546
This commit is contained in:
@ -41,6 +41,32 @@ SET_LINEAR_MEMORY_SIZE(WASMMemoryInstance *memory, uint64 size)
|
||||
#define SET_LINEAR_MEMORY_SIZE(memory, size) memory->memory_data_size = size
|
||||
#endif
|
||||
|
||||
#if WASM_ENABLE_SHARED_HEAP != 0
|
||||
WASMSharedHeap *
|
||||
wasm_runtime_create_shared_heap(SharedHeapInitArgs *init_args, char *error_buf,
|
||||
uint32 error_buf_size);
|
||||
|
||||
bool
|
||||
wasm_runtime_attach_shared_heap(WASMModuleInstanceCommon *module_inst,
|
||||
WASMSharedHeap *shared_heap);
|
||||
bool
|
||||
wasm_runtime_attach_shared_heap_internal(WASMModuleInstanceCommon *module_inst,
|
||||
WASMSharedHeap *shared_heap);
|
||||
|
||||
void
|
||||
wasm_runtime_detach_shared_heap(WASMModuleInstanceCommon *module_inst);
|
||||
void
|
||||
wasm_runtime_detach_shared_heap_internal(WASMModuleInstanceCommon *module_inst);
|
||||
|
||||
uint64
|
||||
wasm_runtime_shared_heap_malloc(WASMModuleInstanceCommon *module_inst,
|
||||
uint64 size, void **p_native_addr);
|
||||
|
||||
void
|
||||
wasm_runtime_shared_heap_free(WASMModuleInstanceCommon *module_inst,
|
||||
uint64 ptr);
|
||||
#endif
|
||||
|
||||
bool
|
||||
wasm_runtime_memory_init(mem_alloc_type_t mem_alloc_type,
|
||||
const MemAllocOption *alloc_option);
|
||||
|
||||
Reference in New Issue
Block a user