Module secmem_alloc::zeroizing_alloc
source · [−]Expand description
An allocator zeroizing memory on deallocation.
This module contains a wrapper for any memory allocator to zeroize memory
before deallocation. This allows use both as a GlobalAlloc
and as
Allocator
.
This is safer than zeroizing your secret objects on drop because the
allocator approach also zeroizes old memory when the object is only moved
in memory but not dropped. This can happen for example when resizing
Vec
s.
Structs
Wrapper around an allocator which zeroizes memory on deallocation. See the module level documentation.