summaryrefslogtreecommitdiff
path: root/Kernel/Memory/MemoryManager.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-08-18 17:36:54 +0200
committerAndreas Kling <kling@serenityos.org>2022-08-18 18:52:34 +0200
commitc14dda14c4faed4fe6468923f066b2979d2c87f9 (patch)
tree4cf1b9ab84343a3b8fe2b86ce39f4ad9a7a4246e /Kernel/Memory/MemoryManager.cpp
parent75348bdfd32003a8420fd5c727e41f5be9918711 (diff)
downloadserenity-c14dda14c4faed4fe6468923f066b2979d2c87f9.zip
Kernel: Add a comment about what the MM lock protects
Diffstat (limited to 'Kernel/Memory/MemoryManager.cpp')
-rw-r--r--Kernel/Memory/MemoryManager.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Kernel/Memory/MemoryManager.cpp b/Kernel/Memory/MemoryManager.cpp
index 881422cf52..b623c7ee94 100644
--- a/Kernel/Memory/MemoryManager.cpp
+++ b/Kernel/Memory/MemoryManager.cpp
@@ -58,6 +58,11 @@ ErrorOr<FlatPtr> page_round_up(FlatPtr x)
// run. If we do, then Singleton would get re-initialized, causing
// the memory manager to be initialized twice!
static MemoryManager* s_the;
+
+// The MM lock protects:
+// - all data members of MemoryManager
+// - the quickmap mechanism
+// - the PTE/PDE mapping mechanism
RecursiveSpinlock s_mm_lock { LockRank::MemoryManager };
MemoryManager& MemoryManager::the()