Commit Graph

9 Commits

Author SHA1 Message Date
Drew Galbraith 92d8a02291 [Zion] Cleanup memory debug statistics slightly. 2023-11-15 13:10:53 -08:00
Drew Galbraith 10d16e129f [Zion] Use a slab allocator for 64 byte and 128 byte allocs.
This has no effect on page usage for now (each uses a small amount of
pages so has some overhead.

However it does reduce the active allocations from
234 -> 146 (64B)
61 -> 51 (128B)
2023-11-15 13:06:14 -08:00
Drew Galbraith cc16210e90 [Zion] Use slab allocators immediately during heap init. 2023-11-15 13:02:34 -08:00
Drew Galbraith 659f122c9e [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
2023-11-15 12:53:14 -08:00
Drew Galbraith 6d27ee5dc5 [Zion] Add more debug information about kernel heap usage.
This will be helpful as we work to improve it.

Without deallocations, we currently stand at the following alloc numbers
8 - 142
16 - 319
32 - 364

unsized - 305

total page usage including slabs is 12.
2023-11-15 12:36:18 -08:00
Drew Galbraith d71d543b2a [Zion] Move to a kernel slab allocator that will allow easier dealloc. 2023-11-15 12:04:35 -08:00
Drew Galbraith ee603b7478 [zion] Add a basic slab allocator to the kernel.
Don't free from the slab allocator yet but allocations appear to work.
2023-08-02 00:54:39 -07:00
Drew Galbraith eb04242a59 Add a debug mode for the KernelHeap. 2023-06-07 10:01:22 -07:00
Drew Galbraith 0b7e667368 Add a basic kernel heap object.
Currently allocation always fails because we don't
have a way to allocate a physical page.
2023-05-18 10:59:39 -07:00