Module holochain_wasmer_guest::allocation
source · [−]Functions
Allocate bytes that won’t be dropped by the allocator.
Return the pointer to the leaked allocation so the host can write to it.
Free an allocation.
Needed because we leak memory every time we call
__allocate
and write_bytes
.Attempt to consume bytes from a known
guest_ptr
and len
.Given an owned vector of bytes, leaks it and returns a pointer the host can
use to read the bytes. This does NOT handle the length of the bytes, so the
guest will need to track the length separately from leaking the vector.