Kernel: pass in MemorySystem

This commit is contained in:
Weiyi Wang
2018-11-20 22:48:19 -05:00
parent 6992f76acf
commit 8118be6615
6 changed files with 17 additions and 7 deletions

View File

@@ -20,7 +20,8 @@ TestEnvironment::TestEnvironment(bool mutable_memory_)
// so we need to create the kernel object there.
// Change this when all global states are eliminated.
Core::System::GetInstance().timing = std::make_unique<Core::Timing>();
Core::System::GetInstance().kernel = std::make_unique<Kernel::KernelSystem>(0);
Memory::MemorySystem memory;
Core::System::GetInstance().kernel = std::make_unique<Kernel::KernelSystem>(memory, 0);
kernel = Core::System::GetInstance().kernel.get();
kernel->SetCurrentProcess(kernel->CreateProcess(kernel->CreateCodeSet("", 0)));