1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00

Kernel: Fix bad VMObject iteration in sys$purge()

We were fooling ourselves into thinking all VMObjects are anonymous and
then tried to call purge() on them as if they were.
This commit is contained in:
Andreas Kling 2021-01-02 13:34:29 +01:00
parent 79328b2aba
commit 9ec9d20e84

View file

@ -43,7 +43,8 @@ int Process::sys$purge(int mode)
{
InterruptDisabler disabler;
MM.for_each_vmobject([&](auto& vmobject) {
vmobjects.append(vmobject);
if (vmobject.is_anonymous())
vmobjects.append(vmobject);
return IterationDecision::Continue;
});
}