(&self, addr: u64, length: u64, on_default: bool)
| 458 | } |
| 459 | |
| 460 | fn mlock(&self, addr: u64, length: u64, on_default: bool) -> result::Result<(), Error> { |
| 461 | // SAFETY: [`base`, `base` + `len`) is guest memory |
| 462 | self.operate_on_memory_range(addr, length, |base, len| unsafe { |
| 463 | libc::mlock2(base, len, if on_default { libc::MLOCK_ONFAULT } else { 0 }) |
| 464 | }) |
| 465 | } |
| 466 | |
| 467 | fn munlock(&self, addr: u64, length: u64) -> result::Result<(), Error> { |
| 468 | // SAFETY: [`base`, `base` + `len`) is guest memory |
no test coverage detected