Struct secmem_alloc::zeroizing_alloc::ZeroizeAlloc [−][src]
pub struct ZeroizeAlloc<BackendAlloc, Z: MemZeroizer = DefaultMemZeroizer> { /* fields omitted */ }
Expand description
Wrapper around an allocator which zeroizes memory on deallocation. See the module level documentation.
If debug assertions are enabled, some of the safety requirement for using an allocator are checked.
Implementations
Create a zeroizing allocator using backend_alloc
for allocations and
zeroizer
to zeroize memory upon deallocation.
Create a zeroizing allocator using backend_alloc
for allocations and
zeroizer
to zeroize memory upon deallocation.
Trait Implementations
allocator_api
)Attempts to allocate a block of memory. Read more
allocator_api
)Behaves like allocate
, but also ensures that the returned memory is zero-initialized. Read more
allocator_api
)Deallocates the memory referenced by ptr
. Read more
allocator_api
)Attempts to extend the memory block. Read more
allocator_api
)Behaves like grow
, but also ensures that the new contents are set to zero before being
returned. Read more
allocator_api
)Attempts to shrink the memory block. Read more
impl<BackendAlloc: Default, Z: Default + MemZeroizer> Default for ZeroizeAlloc<BackendAlloc, Z>
impl<BackendAlloc: Default, Z: Default + MemZeroizer> Default for ZeroizeAlloc<BackendAlloc, Z>
Returns the “default value” for a type. Read more