-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Introduce API for custom stack memory #7209
Conversation
65540ca
to
4f7e6f1
Compare
); | ||
match error { | ||
None => { | ||
let memory = unsafe { memory.assume_init() }; |
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.
This is a much safer API, because we don't need to assume they will sent env
and finalizer
to nullptr if they don't need them.
Subscribe to Label Actioncc @peterhuene
This issue or pull request has been labeled: "wasmtime:api", "wasmtime:c-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 |
This allows custom implementations of stack memory to be plugged into the async functionality for wasmtime. Currently, stacks are always mmapped, and this custom allocator allows embedders to use any memory they would like. The new APIs are also exposed in the C api. This has no effect on windows, as our hands are tied with fibers there. Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
b3a3730
to
4cfdfc4
Compare
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.
(Going to leave the C API bits to Alex to review)
Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
d19ac9e
to
a793be8
Compare
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.
Nice! I looked through the C API changes in more detail as well, and they look good as well.
Thanks @rockwotj!
prtest:full Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
Thanks @fitzgen! I messed up some lint warnings when the |
prtest:full Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
Introduces an API to allow embedders to allocate stacks for fibers using custom memory instead of mmap.
Discussed on Zulip