Michael Shaw
db5990cc97
mem: add locks to kernel memory management structures
2023-05-27 02:11:27 -04:00
Michael Shaw
29a0435cf6
slab: replace struct slab with slab_t
...
This type should never be modified by the user, and only passed into the
functions in slab.c. Using a typedef to notifies the user semantically
of this fact
2023-05-19 16:49:34 -04:00
Michael Shaw
ea1c1b337d
rbt: remove verify function
2023-05-10 21:57:40 -04:00
Michael Shaw
c712f0a7d6
kmalloc: add consistency test when KDEBUG is defined
2023-05-10 21:41:25 -04:00
Michael Shaw
4e36cfd90b
lib: add rbtree data structure
...
This also switches the kmalloc allocator over to the new rbtree
structure. As a balanced binary search tree, it is much more efficient
than the previous method
2023-05-10 21:24:19 -04:00
Michael Shaw
d3e9b728dc
slab: no longer automatically allocate slab cache sizes
2023-05-10 13:18:37 -04:00
Michael Shaw
8544efe1ab
slab: upgrade kmalloc to allow DMA regions
...
these DMA regions are only meant to comply with certain AHCI
requirements, and are not yet general purpose
2023-05-08 01:14:11 -04:00
Michael Shaw
47edaa8512
slab: add kzalloc
2023-05-04 15:26:40 -04:00
Michael Shaw
e1108b3493
mem: improve slabbing to include flags
2023-04-29 16:54:12 -04:00
Michael Shaw
794c328809
mem: update slab allocator
...
the slab allocator will now free slabs if they are not the first slab
for a given size and they are empty
2023-04-20 19:22:07 -04:00
Michael Shaw
577779f8ae
mem: add kmalloc and kfree
2023-04-20 17:03:10 -04:00
Michael Shaw
74a58d6641
mem: add basic slab allocator
2023-04-20 16:06:49 -04:00