Trait xalloc::arena::UnsafeArenaWithMembershipCheck
source · pub trait UnsafeArenaWithMembershipCheck<T>: UnsafeArena<T> {
unsafe fn contains_unchecked(&self, ptr: &Self::Ptr) -> bool;
}
Expand description
Homogeneous memory arena types capable of checking whether a given pointer was created by the same instance of the arena.
Required Methods
sourceunsafe fn contains_unchecked(&self, ptr: &Self::Ptr) -> bool
unsafe fn contains_unchecked(&self, ptr: &Self::Ptr) -> bool
Return true
if the pointer was created from the same instance of the
arena.
Calling this with an already-freed pointer or an uninitialized pointer might result in an undefined behavior.