Kernel: Tear down process address space during finalization

Process teardown is divided into two main stages: finalize and reap.

Finalization happens in the "Finalizer" kernel and runs with interrupts
enabled, allowing destructors to take locks, etc.

Reaping happens either in sys$waitid() or in the scheduler for orphans.

The more work we can do in finalization, the better, since it's fully
pre-emptible and reduces the amount of time the system runs without
interrupts enabled.
This commit is contained in:
Andreas Kling 2020-02-17 14:33:06 +01:00
parent 0e33f53cf8
commit 4f4af24b9d
Notes: sideshowbarker 2024-07-19 09:15:57 +09:00

View file

@ -3016,6 +3016,8 @@ void Process::finalize()
}
}
m_regions.clear();
m_dead = true;
}