add a class to allocate and manage user space stacks

This commit is contained in:
Drew Galbraith 2023-05-30 22:35:57 -07:00
parent 1db93e5b12
commit 2eefda6114
6 changed files with 67 additions and 7 deletions

View file

@ -17,8 +17,8 @@ VirtualMemory::VirtualMemory() {
InitializePml4(cr3_);
}
uint64_t* VirtualMemory::AllocateKernelStack() {
return gKernelStackManager->AllocateKernelStack();
uint64_t VirtualMemory::AllocateUserStack() {
return user_stacks_.NewUserStack();
}
uint64_t VirtualMemory::GetNextMemMapAddr(uint64_t size) {
@ -29,3 +29,7 @@ uint64_t VirtualMemory::GetNextMemMapAddr(uint64_t size) {
}
return addr;
}
uint64_t* VirtualMemory::AllocateKernelStack() {
return gKernelStackManager->AllocateKernelStack();
}