Exclude PhysBorrowed from counting shared memory
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user