make the release page mechanism visible externally for swap config

This commit is contained in:
bunnie 2024-03-08 04:12:01 +08:00
parent 47a16b6ce4
commit 6806403da8

View file

@ -667,6 +667,12 @@ impl MemoryManager {
self.claim_release_move(addr, pid, ClaimReleaseMove::Release)
}
#[cfg(feature = "swap")]
/// Same as `release_page`, but with public visibility when the `swap` feature is active
pub fn release_page_swap(&mut self, addr: *mut usize, pid: PID) -> Result<(), xous_kernel::Error> {
self.claim_release_move(addr, pid, ClaimReleaseMove::Release)
}
/// Convert an offset in the `MEMORY_ALLOCATIONS` array into a physical address.
#[cfg(baremetal)]
fn allocation_offset_to_address(&self, offset: usize) -> Option<usize> {