Expand description
Secure memory helpers: mlock, madvise, zeroize.
These prevent secrets from being swapped to disk or included in core dumps. All functions are best-effort on non-Linux platforms.
Functions§
- madvise_
dontdump - Advise the kernel to exclude this memory from core dumps.
- mlock
- Lock a memory region to prevent it from being swapped to disk. Returns Ok(()) on success, Err with a warning message on failure.
- munlock
- Unlock a previously locked memory region.