Merge pull request #2740 from bytecodealliance/dev/wasi-libc-windows
The implementation is already in a stage where it's possible to compile WAMR with wasi libc enabled and run wasi modules without errors.
This commit is contained in:
@ -330,8 +330,9 @@ memory_instantiate(WASMModuleInstance *module_inst, WASMModuleInstance *parent,
|
||||
}
|
||||
|
||||
#ifdef BH_PLATFORM_WINDOWS
|
||||
if (!os_mem_commit(mapped_mem, memory_data_size,
|
||||
MMAP_PROT_READ | MMAP_PROT_WRITE)) {
|
||||
if (memory_data_size > 0
|
||||
&& !os_mem_commit(mapped_mem, memory_data_size,
|
||||
MMAP_PROT_READ | MMAP_PROT_WRITE)) {
|
||||
set_error_buf(error_buf, error_buf_size, "commit memory failed");
|
||||
os_munmap(mapped_mem, map_size);
|
||||
goto fail1;
|
||||
|
||||
Reference in New Issue
Block a user