WIP: Track grant ownership.

This commit is contained in:
4lDO2
2023-06-20 20:06:34 +02:00
parent e7d94ddff5
commit 490e1b2777
9 changed files with 252 additions and 194 deletions
+2 -1
View File
@@ -86,7 +86,8 @@ pub fn resource() -> Result<Vec<u8>> {
}
if let Ok(addr_space) = context.addr_space() {
for (_base, info) in addr_space.read().grants.iter() {
if info.is_owned() {
// TODO: method
if matches!(info.provider, context::memory::Provider::Allocated { .. }) {
memory += info.page_count() * PAGE_SIZE;
}
}