mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-06 06:55:07 +00:00
Update memory allocation functions to use allocator user data (#4043)
This commit is contained in:
parent
171d35698a
commit
376385c608
|
@ -1367,7 +1367,7 @@ wasm_enlarge_memory_internal(WASMModuleInstanceCommon *module,
|
|||
if (!(memory_data_new =
|
||||
realloc_func(Alloc_For_LinearMemory, full_size_mmaped,
|
||||
#if WASM_MEM_ALLOC_WITH_USER_DATA != 0
|
||||
NULL,
|
||||
allocator_user_data,
|
||||
#endif
|
||||
memory_data_old, total_size_new))) {
|
||||
ret = false;
|
||||
|
@ -1680,7 +1680,7 @@ wasm_deallocate_linear_memory(WASMMemoryInstance *memory_inst)
|
|||
(void)map_size;
|
||||
free_func(Alloc_For_LinearMemory,
|
||||
#if WASM_MEM_ALLOC_WITH_USER_DATA != 0
|
||||
NULL,
|
||||
allocator_user_data,
|
||||
#endif
|
||||
memory_inst->memory_data);
|
||||
#else
|
||||
|
@ -1733,7 +1733,7 @@ wasm_allocate_linear_memory(uint8 **data, bool is_shared_memory,
|
|||
(void)wasm_mmap_linear_memory;
|
||||
if (!(*data = malloc_func(Alloc_For_LinearMemory,
|
||||
#if WASM_MEM_ALLOC_WITH_USER_DATA != 0
|
||||
NULL,
|
||||
allocator_user_data,
|
||||
#endif
|
||||
*memory_data_size))) {
|
||||
return BHT_ERROR;
|
||||
|
|
Loading…
Reference in New Issue
Block a user