mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 13:35:07 +00:00
Kernel: Put all Regions on InlineLinkedLists (separated by user/kernel)
Remove the global hash tables and replace them with InlineLinkedLists. This significantly reduces the kernel heap pressure from doing many small mmap()'s.
This commit is contained in:
parent
a96d76fd90
commit
07425580a8
4 changed files with 14 additions and 8 deletions
|
@ -110,11 +110,11 @@ void VMObject::for_each_region(Callback callback)
|
|||
{
|
||||
// FIXME: Figure out a better data structure so we don't have to walk every single region every time an inode changes.
|
||||
// Perhaps VMObject could have a Vector<Region*> with all of his mappers?
|
||||
for (auto* region : MM.m_user_regions) {
|
||||
for (auto* region = MM.m_user_regions.head(); region; region = region->next()) {
|
||||
if (®ion->vmo() == this)
|
||||
callback(*region);
|
||||
}
|
||||
for (auto* region : MM.m_kernel_regions) {
|
||||
for (auto* region = MM.m_kernel_regions.head(); region; region = region->next()) {
|
||||
if (®ion->vmo() == this)
|
||||
callback(*region);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue