Kernel: All process' memory areas can report their virtual mem usage

This commit is contained in:
Bananymous
2023-09-30 21:15:46 +03:00
parent d7a00e8cc2
commit 56bb419884
4 changed files with 9 additions and 0 deletions

View File

@@ -124,6 +124,8 @@ namespace LibELF
dprintln("Invalid program header");
return BAN::Error::from_errno(EINVAL);
}
m_virtual_page_count += BAN::Math::div_round_up<size_t>((pheader.p_vaddr % PAGE_SIZE) + pheader.p_memsz, PAGE_SIZE);
}
return {};