Struct secmem_alloc::zeroize::X86_64Sse2Zeroizer
source · [−]pub struct X86_64Sse2Zeroizer;
Expand description
This zeroizer uses inline asm with sse2 instructions if the pointer is 16
byte aligned, and otherwise uses VolatileWrite8Zeroizer
. This zeroization
technique is available for x86_64 platforms with sse2 cpu support on stable,
and reasonably fast for 16 byte aligned pointers.
In addition to the volatile write we place a compiler fence right next to the volatile write. This should not be necessary for secure zeroization since the volatile semantics guarenties our writes are not elided, and they can not be delayed since we are deallocating the memory after zeroization. The use of this fence is therefore only a precaution.
This zeroization method can benefit (in terms of performance) from using the
MemZeroizer::zeroize_mem_blocks
function instead of
MemZeroizer::zeroize_mem
function if a minimum alignment is known
at compile time.
Trait Implementations
sourceimpl Clone for X86_64Sse2Zeroizer
impl Clone for X86_64Sse2Zeroizer
sourcefn clone(&self) -> X86_64Sse2Zeroizer
fn clone(&self) -> X86_64Sse2Zeroizer
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for X86_64Sse2Zeroizer
impl Debug for X86_64Sse2Zeroizer
sourceimpl Default for X86_64Sse2Zeroizer
impl Default for X86_64Sse2Zeroizer
sourcefn default() -> X86_64Sse2Zeroizer
fn default() -> X86_64Sse2Zeroizer
Returns the “default value” for a type. Read more
sourceimpl MemZeroizer for X86_64Sse2Zeroizer
impl MemZeroizer for X86_64Sse2Zeroizer
impl Copy for X86_64Sse2Zeroizer
Auto Trait Implementations
impl RefUnwindSafe for X86_64Sse2Zeroizer
impl Send for X86_64Sse2Zeroizer
impl Sync for X86_64Sse2Zeroizer
impl Unpin for X86_64Sse2Zeroizer
impl UnwindSafe for X86_64Sse2Zeroizer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more