-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mpk: add an example testing the memory limits #7609
Conversation
How do we want to handle this? The two added dependencies are |
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat! I like having little example programs like this.
Subscribe to Label Actioncc @peterhuene
This issue or pull request has been labeled: "wasmtime:api", "wasmtime:config"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
Label Messager: wasmtime:configIt looks like you are changing Wasmtime's configuration options. Make sure to
To modify this label's message, edit the To add new label messages or remove existing label messages, edit the |
It is inconvenient to have to construct a `PoolingAllocationConfig` in order to check if memory protection keys are available. This removes the unused `&self` restriction.
When double-checking the slab layout calculations it is quite convenient to see the total slab size. This helps in correlating with mapped regions.
This adds an example that can be run with `cargo run --example mpk`. Not only does the example demonstrate how to build a pool-allocated engine that uses MPK, it performs an exponential search to find the maximum number of slots the system can support, with and without MPK.
This change adds an example program showing:
The output could look like:
The example program probes exponentially larger memory pools to find the maximum available on the current system. This search is highly dependent on the memory available, the OS limits on VMAs, and various engine configuration parameters. See the example docs for more details.