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
4657c46f73
[Zion] Fix kernel heap distribution calculation.
2023-11-15 12:14:58 -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
e5568450c2
[Zion] Make kernel slab allocation failures less chatty.
...
We started to hit this constraint but the allocators are due for
a redesign that actually does deallocation soon.
2023-11-15 09:45:37 -08:00
Drew Galbraith
69aced2220
[Zion] Move to StrFormat for debug line.
2023-11-05 09:24:09 -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
02e6b49d90
[glacier] Add a vector class
2023-06-26 15:46:03 -07:00
Drew Galbraith
b6735d3175
[zion] Fix an over-allocation bug when creating a memory object
2023-06-12 20:55:53 -07:00
Drew Galbraith
eb04242a59
Add a debug mode for the KernelHeap.
2023-06-07 10:01:22 -07:00
Drew Galbraith
cb41953354
Scheduler with working threads.
...
Currently only one process but it is a start.
2023-05-18 13:24:02 -07:00
Drew Galbraith
4380590af2
Add new and delete operator implementations to the kernel heap.
...
For now delete does nothing.
2023-05-18 11:29:44 -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