mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 09:04:30 +00:00
Fix dumb-but-hard-to-find bug in paging.
This was the fix: -process.m_page_directory[0] = m_kernel_page_directory[0]; -process.m_page_directory[1] = m_kernel_page_directory[1]; +process.m_page_directory->entries[0] = m_kernel_page_directory->entries[0]; +process.m_page_directory->entries[1] = m_kernel_page_directory->entries[1]; I spent a good two hours scratching my head, not being able to figure out why user process page directories felt they had ownership of page tables in the kernel page directory. It was because I was copying the entire damn kernel page directory into the process instead of only sharing the two first PDE's. Dang!
This commit is contained in:
@@ -79,7 +79,7 @@ void* kmalloc_eternal(size_t size)
|
||||
|
||||
void* kmalloc_page_aligned(size_t size)
|
||||
{
|
||||
ASSERT((size % 4096) == 0);
|
||||
ASSERT((size % PAGE_SIZE) == 0);
|
||||
void* ptr = s_next_page_aligned_ptr;
|
||||
s_next_page_aligned_ptr += size;
|
||||
ASSERT(s_next_page_aligned_ptr < s_end_of_page_aligned_range);
|
||||
|
||||
Reference in New Issue
Block a user