Exclude PhysBorrowed from counting shared memory

This commit is contained in:
Wildan M
2026-04-19 17:17:48 +07:00
committed by Jeremy Soller
parent aee49d747a
commit bbfbe30445
+3
View File
@@ -47,6 +47,9 @@ pub fn resource(token: &mut CleanLockToken) -> Result<Vec<u8>> {
context::memory::Provider::Allocated { .. } => {
private_memory += info.page_count() * crate::memory::PAGE_SIZE
}
// Excluded because it is not allocable by user, whether if
// this region is counted toward usable memory remain unknown
context::memory::Provider::PhysBorrowed { .. } => {}
_ => shared_memory += info.page_count() * crate::memory::PAGE_SIZE,
}
}