pub fn mlock(ptr: *mut u8, size: usize) -> Result<(), AllocFailed>
Lock memory to prevent swapping (for sensitive data).