1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 12:15:09 +00:00

Add slightly better kmalloc_aligned() and kfree_aligned().

Process page directories can now actually be freed. This could definitely
be implemented in a nicer, less wasteful way, but this works for now.

The spawn stress test can now run for a lot longer but eventually dies
due to kmalloc running out of memory.
This commit is contained in:
Andreas Kling 2018-12-26 21:31:46 +01:00
parent 55c722096d
commit f6179ad9f9
5 changed files with 26 additions and 20 deletions

View file

@ -58,6 +58,8 @@ void MemoryManager::release_page_directory(PageDirectory& page_directory)
#ifdef SCRUB_DEALLOCATED_PAGE_TABLES
memset(&page_directory, 0xc9, sizeof(PageDirectory));
#endif
kfree_aligned(&page_directory);
}
void MemoryManager::initialize_paging()