Struct sensitive::alloc::Sensitive [−][src]
pub struct Sensitive;
Implementations
impl Sensitive
[src]
impl Sensitive
[src]pub const GUARD_PAGES: usize
[src]
pub fn guard_size() -> usize
[src]
Trait Implementations
impl Allocator for Sensitive
[src]
impl Allocator for Sensitive
[src]fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>
[src]
fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>
[src]🔬 This is a nightly-only experimental API. (
allocator_api
)Attempts to allocate a block of memory. Read more
fn allocate_zeroed(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>
[src]
fn allocate_zeroed(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>
[src]🔬 This is a nightly-only experimental API. (
allocator_api
)Behaves like allocate
, but also ensures that the returned memory is zero-initialized. Read more
unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout)
[src]
unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout)
[src]🔬 This is a nightly-only experimental API. (
allocator_api
)Deallocates the memory referenced by ptr
. Read more
unsafe fn shrink(
&self,
ptr: NonNull<u8>,
old: Layout,
new: Layout
) -> Result<NonNull<[u8]>, AllocError>
[src]
unsafe fn shrink(
&self,
ptr: NonNull<u8>,
old: Layout,
new: Layout
) -> Result<NonNull<[u8]>, AllocError>
[src]🔬 This is a nightly-only experimental API. (
allocator_api
)Attempts to shrink the memory block. Read more
unsafe fn grow(
&self,
ptr: NonNull<u8>,
old_layout: Layout,
new_layout: Layout
) -> Result<NonNull<[u8]>, AllocError>
[src]
unsafe fn grow(
&self,
ptr: NonNull<u8>,
old_layout: Layout,
new_layout: Layout
) -> Result<NonNull<[u8]>, AllocError>
[src]🔬 This is a nightly-only experimental API. (
allocator_api
)Attempts to extend the memory block. Read more