I'm using Wasm as a JIT runtime by emitting a module when a hot loop is detected. I want to have multiple instances in the trace cache and I want to be able to evict them. How do I represent this in Wasmtime?
I understand cleaning up instances means one store and module per instance. How do I share a memory between them? Is it safe to have a MemoryCreator that dispenses LinearMemories pointing to the same buffer? Is there a way to coordinate growth between instances?
Is it safe to have a MemoryCreator that dispenses LinearMemories pointing to the same buffer?
Instead you would want to have the modules take memory imports and then create a wasmtime::Memory
and instantiate multiple instances with the same memory argument.
Last updated: Dec 23 2024 at 12:05 UTC