diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-17 14:33:06 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-17 14:33:06 +0100 |
commit | 4f4af24b9d489634a66d818260a7f87964faf421 (patch) | |
tree | b81345f2ae11754506784477e68c37c09d0dc740 /Kernel/Process.cpp | |
parent | 0e33f53cf82bc757f4b7e8f21dbf211c5d188249 (diff) | |
download | serenity-4f4af24b9d489634a66d818260a7f87964faf421.zip |
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.
Diffstat (limited to 'Kernel/Process.cpp')
-rw-r--r-- | Kernel/Process.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index f7974a72fa..6b00ddf4d5 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -3016,6 +3016,8 @@ void Process::finalize() } } + m_regions.clear(); + m_dead = true; } |