[−][src]Module holochain_wasmer_common::allocation
Constants
ALLOCATION_BYTES_ITEMS | Need Allocation to be u8 to copy as bytes across host/guest the u64 integers of an allocation are broken down into u8 bytes to copy into wasm memory |
ALLOCATION_ITEMS | Allocation is a 2 item u64 slice of offset/length |
Functions
allocate | allocate a length of bytes that won't be dropped by the allocator return the pointer to it so bytes can be written to the allocation |
deallocate | restore an allocation so that it is dropped immediately this needs to be called on anything allocated above as the allocator will never free the memory otherwise |
Type Definitions
Allocation | |
AllocationBytes |