From 92173bbda71714f4c4f0213f3c2402ba4e06efa3 Mon Sep 17 00:00:00 2001 From: radu Date: Sun, 23 Jun 2024 03:43:08 +0300 Subject: [PATCH] testing mlock --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index e571438..39c1e33 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -108,8 +108,8 @@ fn as_array<'a>(arr: &'a Bound, py: Python<'a>) -> PyResult<&'a [u8]> { /// Calls the platform's underlying `mlock(2)` implementation. unsafe fn _mlock(ptr: *mut u8, len: usize) -> bool { - memsec::mlock(ptr, len) - // region::lock(ptr, len).is_ok() + // memsec::mlock(ptr, len) + region::lock(ptr, len).is_ok() } /// Calls the platform's underlying `munlock(2)` implementation.