[Zion] Free memory that was allocated with the slab allocator.

This reduces the number of active allocs by ~ 200.
Size 8: 142 -> 2
Size 16: 319 > 313
Size 32: 364-> 312
This commit is contained in:
Drew Galbraith 2023-11-15 12:53:14 -08:00
parent 6d27ee5dc5
commit 659f122c9e
6 changed files with 50 additions and 15 deletions

11
zion/memory/constants.h Normal file
View file

@ -0,0 +1,11 @@
#pragma once
#include <stdint.h>
const uint64_t KiB = 0x400;
const uint64_t kPageSize = 4 * KiB;
const uint64_t kKernelSlabHeapStart = 0xFFFF'FFFF'4000'0000;
const uint64_t kKernelSlabHeapEnd = 0xFFFF'FFFF'6000'0000;
const uint64_t kKernelBuddyHeapStart = 0xFFFF'FFFF'6000'0000;
const uint64_t kKernelBuddyHeapEnd = 0xFFFF'FFFF'8000'0000;