Skip to main content

mask_ptr

Function mask_ptr 

Source
pub fn mask_ptr(tagged: *mut u8, mode: MaskingMode) -> *mut u8
Expand description

Strip metadata bits from a tagged pointer, returning the raw address.

Safe to call on any pointer — if no metadata is present, this is a no-op (the upper bits will already be zero for valid user-space pointers).