mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:07:34 +00:00
Kernel: Slap UNMAP_AFTER_INIT on a whole bunch of functions
There's no real system here, I just added it to various functions that I don't believe we ever want to call after initialization has finished. With these changes, we're able to unmap 60 KiB of kernel text after init. :^)
This commit is contained in:
parent
32e93c8808
commit
fdf03852c9
22 changed files with 69 additions and 68 deletions
|
@ -141,7 +141,7 @@ void for_each_allocator(Callback callback)
|
|||
callback(s_slab_allocator_128);
|
||||
}
|
||||
|
||||
void slab_alloc_init()
|
||||
UNMAP_AFTER_INIT void slab_alloc_init()
|
||||
{
|
||||
s_slab_allocator_16.init(128 * KiB);
|
||||
s_slab_allocator_32.init(128 * KiB);
|
||||
|
|
|
@ -211,7 +211,7 @@ void kmalloc_enable_expand()
|
|||
g_kmalloc_global->allocate_backup_memory();
|
||||
}
|
||||
|
||||
void kmalloc_init()
|
||||
UNMAP_AFTER_INIT void kmalloc_init()
|
||||
{
|
||||
// Zero out heap since it's placed after end_of_kernel_bss.
|
||||
memset(kmalloc_eternal_heap, 0, sizeof(kmalloc_eternal_heap));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue