Stream: general

Topic: Pooling allocation support


view this post on Zulip Radu Matei (May 12 2021 at 19:40):

How does one compile a module with pooling allocation support enabled?
Trying to enable pooling allocation in Wasmtime:

Module was compiled without pooling allocation support but it is enabled for the host.

view this post on Zulip Alex Crichton (May 12 2021 at 19:58):

@Radu M that's done by tweaking settings on a Config, where the precompiled module needs to have basically the same settings as the store you're deserializing the precompiled module from

view this post on Zulip Radu Matei (May 12 2021 at 20:15):

Which Config object exactly?
When instantiating modules using the Linker, you can only tweak the store's config, if I'm not mistaken.

view this post on Zulip Alex Crichton (May 12 2021 at 20:20):

@Radu M there's only one Config object in the API, and it's configured before you create an Engine

view this post on Zulip Alex Crichton (May 12 2021 at 20:21):

I believe it's this method

view this post on Zulip Radu Matei (May 12 2021 at 20:21):

Yeah, that's what I'm using as well.

view this post on Zulip Alex Crichton (May 12 2021 at 20:22):

and the Config is configured the same way for the serialized/precompiled module as well as the engine that's deserializing the module?

view this post on Zulip Radu Matei (May 12 2021 at 20:26):

Ah, you're right. I was trying to use an AOT compiled module, my bad.

view this post on Zulip Peter Huene (May 12 2021 at 21:00):

Yeah right now the wasmtime compile command doesn't support use with the pooling allocator out of the box, but you can set up a pooling allocator Config and call Engine::precompile_module just as easily


Last updated: Dec 23 2024 at 12:05 UTC