mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 10:09:14 +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
Notes:
sideshowbarker
2024-07-19 03:19:53 +09:00
Author: https://github.com/tomuta
Commit: 8a75e0b892
Pull-request: https://github.com/SerenityOS/serenity/pull/3248
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