Option for host managed memory (#1400)

* Option for host managed memory

* Rename Allocator to MemoryCreator

* Create LinearMemory and MemoryCreator traits in api

* Leave only one as_ptr function in LinearMemory trait

* Memory creator test

* Update comments/docs for LinearMemory and MemoryCreator traits

* Add guard page to the custom memory example

* Remove mut from LinearMemory trait as_ptr

* Host_memory_grow test
This commit is contained in:
Maciej Kot
2020-04-06 23:52:43 +09:00
committed by GitHub
parent c2cb4ea3ff
commit 78c548dc8f
11 changed files with 356 additions and 17 deletions

View File

@@ -31,6 +31,7 @@ fn instantiate(
config.validating_config.operator_config.enable_bulk_memory,
&mut resolver,
sig_registry,
config.memory_creator.as_ref().map(|a| a as _),
)
.map_err(|e| -> Error {
match e {