Trait xalloc::arena::UnsafeArenaWithMembershipCheck [] [src]

pub trait UnsafeArenaWithMembershipCheck<T>: UnsafeArena<T> {
    unsafe fn contains_unchecked(&self, ptr: &Self::Ptr) -> bool;
}

Homogeneous memory arena types capable of checking whether a given pointer was created by the same instance of the arena.

Required Methods

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.

Implementors