Rearrange memory manager into two classes.

page_manager and memory_manager are now separate, and are also pre
allocated in the kernel so they don't have to allocate themselves.
This commit is contained in:
Justin C. Miller
2018-04-21 17:34:33 -07:00
parent 4a38a74b16
commit 57abb03deb
6 changed files with 68 additions and 30 deletions

View File

@@ -3,8 +3,9 @@
#include "memory.h"
#include "memory_pages.h"
memory_manager *memory_manager::s_instance = nullptr;
memory_manager g_memory_manager;
memory_manager::memory_manager(page_block *free, page_block *used, void *scratch, size_t scratch_len)
memory_manager::memory_manager()
{
kassert(this == &g_memory_manager, "Attempt to create another memory_manager.");
}