zeroize

Function volatile_set

source
pub(crate) unsafe fn volatile_set<T: Copy + Sized>(
    dst: *mut T,
    src: T,
    count: usize,
)
Expand description

Perform a volatile memset operation which fills a slice with a value

Safety: The memory pointed to by dst must be a single allocated object that is valid for count contiguous elements of T. count must not be larger than an isize. dst being offset by mem::size_of::<T> * count bytes must not wrap around the address space. Also dst must be properly aligned.