forked from fermyon/spin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dynamically detect support for Wasmtime's pooling allocator
This commit is intended to address fermyon#2119 and mirror bytecodealliance/wasmtime#8610. The base problem is that some systems are configured with smaller amounts of virtual memory than other systems, for example some aarch64 and riscv64 systems are shown to have only 39 bits of virtual address space rather than the 48 by default on x86_64. This means that the pooling allocator can't be initialized on these platforms since it needs more virtual memory than that. This changes Spin to dynamically choosing whether to use the pooling allocator. It's still used by default in Wasmtime but a dynamic probe is performed to determine whether it's going to work first. While here I also added an env var to control this behavior for an escape hatch if that's needed in the future too. Closes fermyon#2119 Signed-off-by: Alex Crichton <alex@alexcrichton.com>
- Loading branch information
1 parent
fc1f835
commit f89d7df
Showing
1 changed file
with
90 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters