Skip to main content

encode_heap

Function encode_heap 

Source
pub fn encode_heap(tag: u64, ptr: *const u8) -> u64
Expand description

Encode a heap-allocated value (pointer must be valid and aligned). The pointer’s lower 48 bits are stored, higher bits must be zero-extendable. On x86-64, user-space pointers are < 2^48 so this is safe.