Calls to `VirtualFree` that pass `MEM_RELEASE` must specify a size of 0 as the OS will be freeing the original range for the given base address. The calls to free `MMap` memory on Windows were silently failing because of an incorrect assertion (on Windows, `VirtualFree` returns non-zero for success). This was caught via AppVerifier while investigating a heap overrun issue on a different PR.
This is the wasmtime-runtime crate, which contains wasm runtime library
support, supporting the wasm ABI used by wasmtime-environ,
wasmtime-jit, and wasmtime-obj.
This crate does not make a host vs. target distinction; it is meant to be compiled for the target.