Rewrite linear memory handling in terms of simple mmap/VirtualAlloc.

The memmap crate doesn't make it straightforward to have part of the
region be writeable and part readonly. Since this is a fairly boutique
use case, and we don't need all that much code, just use the low-level
APIs directly.

Also, introduce a concept of "tunables" for adjusting the parameters of
the runtime.
This commit is contained in:
Dan Gohman
2018-11-29 10:11:11 -08:00
parent 1b98efd979
commit f44fe25f9c
13 changed files with 359 additions and 111 deletions

View File

@@ -10,14 +10,14 @@ license = "Apache-2.0 WITH LLVM-exception"
readme = "README.md"
[dependencies]
cranelift-codegen = "0.25.0"
cranelift-entity = "0.25.0"
cranelift-wasm = "0.25.0"
cranelift-codegen = { git = "https://github.com/sunfishcode/cranelift.git", branch = "guard-offset" }
cranelift-entity = { git = "https://github.com/sunfishcode/cranelift.git", branch = "guard-offset" }
cranelift-wasm = { git = "https://github.com/sunfishcode/cranelift.git", branch = "guard-offset" }
wasmtime-environ = { path = "../environ" }
region = "1.0.0"
memmap = "0.7.0"
lazy_static = "1.2.0"
libc = "0.2.44"
errno = "0.2.4"
[build-dependencies]
cmake = "0.1.35"