Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions core/iwasm/common/wasm_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -1389,20 +1389,20 @@ wasm_enlarge_memory_internal(WASMModuleInstanceCommon *module,
if (full_size_mmaped) {
#ifdef BH_PLATFORM_WINDOWS
if (!os_mem_commit(memory->memory_data_end,
(mem_offset_t)(total_size_new - total_size_old),
total_size_new - total_size_old,
MMAP_PROT_READ | MMAP_PROT_WRITE)) {
ret = false;
goto return_func;
}
#endif

if (os_mprotect(memory->memory_data_end,
(mem_offset_t)(total_size_new - total_size_old),
total_size_new - total_size_old,
MMAP_PROT_READ | MMAP_PROT_WRITE)
!= 0) {
#ifdef BH_PLATFORM_WINDOWS
os_mem_decommit(memory->memory_data_end,
(mem_offset_t)(total_size_new - total_size_old));
total_size_new - total_size_old);
#endif
ret = false;
goto return_func;
Expand Down