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.
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 DetailsThis 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
DetailsTo 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
fitzgen
left a comment
There was a problem hiding this comment.
(Going to leave the C API bits to Alex to review)
Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
d19ac9e to
a793be8
Compare
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