mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:47:35 +00:00
Kernel: Fix regression where MemoryManager is initialized twice
MemoryManager cannot use the Singleton class because MemoryManager::initialize is called before the global constructors are run. That caused the Singleton to be re-initialized, causing it to create another MemoryManager instance.
This commit is contained in:
parent
f0906250a1
commit
8a75e0b892
2 changed files with 7 additions and 6 deletions
|
@ -85,7 +85,6 @@ class MemoryManager {
|
|||
friend Optional<KBuffer> procfs$memstat(InodeIdentifier);
|
||||
|
||||
public:
|
||||
MemoryManager();
|
||||
static MemoryManager& the();
|
||||
|
||||
static void initialize(u32 cpu);
|
||||
|
@ -161,6 +160,7 @@ public:
|
|||
PageDirectory& kernel_page_directory() { return *m_kernel_page_directory; }
|
||||
|
||||
private:
|
||||
MemoryManager();
|
||||
~MemoryManager();
|
||||
|
||||
enum class AccessSpace { Kernel,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue