Skip to content

Commit

Permalink
testing mlock
Browse files Browse the repository at this point in the history
  • Loading branch information
radu committed Jun 23, 2024
1 parent 4660b40 commit 92173bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ fn as_array<'a>(arr: &'a Bound<PyAny>, 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.
Expand Down

0 comments on commit 92173bb

Please sign in to comment.