[kernel] Move kernel stacks out of the heap
We were previously allocating kernel stacks as large objects on the heap. Now keep track of areas of the kernel stack area that are in use, and allocate them from there. Also required actually implementing vm_space::commit(). This still needs more work.
This commit is contained in:
@@ -325,6 +325,10 @@ page_manager::fault_handler(uintptr_t addr)
|
||||
bool user = addr < kernel_offset;
|
||||
map_pages(page, 1, user);
|
||||
|
||||
// Kernel stacks: zero them upon mapping them
|
||||
if (addr >= memory::stacks_start && addr < memory::heap_start)
|
||||
kutil::memset(reinterpret_cast<void*>(page), 0, memory::frame_size);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user