alexcrichton opened PR #3732 from configure-ufd
to main
:
This commit updates how the
uffd
feature of Wasmtime is enabled and
used. Previously to useuffd
users needed to do a few things:
- Enable the pooling allocator
- Enable paged memory initialization
- Enable the
uffd
feature at compile timeIf any one of these were omitted, however, then
uffd
was silently not
used or otherwise wasn't beneficial (e.g. forgetting paged memory
initialization means that memories would be all initialized
immediately).This commit changes this configuration to instead have consumers
explicitly requestuffd
as part of enabling the pooling allocation
strategy. This makes it clear thatuffd
is only enabled for the
pooling allocator, and requests to enable it when the feature isn't
compiled in (or is the wrong platform) can return an error indicating
what happened.This does sort of effectively revert #3245 which allows enabling paged
memory initialization independent of uffd, but at this time I can't
quite remember what the motivation was for that PR so I'm hoping that
this can jog a memory!<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
alexcrichton closed without merge PR #3732.
Last updated: Dec 23 2024 at 12:05 UTC