summaryrefslogtreecommitdiff
path: root/src/mm
AgeCommit message (Collapse)Author
2025-10-07mm: add kzalloc helperCarlos Maiolino
Signed-off-by: Carlos Maiolino <[email protected]>
2025-09-14Add a kernel heapCarlos Maiolino
Use the heap API to implement a 100MiB heap to be used by the kernel code. Add example usage to src/kernel.c Signed-off-by: Carlos Maiolino <[email protected]>
2025-09-14heap_malloc_pages should check for a negative valueCarlos Maiolino
The first heap page (0x0) is a valid and usable page for now. When checking the starting page from heap_get_start_page(), we need to take that into account, otherwise we'll always return the first 0x0 page as the allocated page. This makes the users to always get 0x0 as the allocated region. We loose the possibility for error checking here, so we'll need to rework this API so we can get an error check. Signed-off-by: Carlos Maiolino <[email protected]>
2025-09-14Add a simple heap implementationCarlos Maiolino
Add a simple API implementing a heap memory area. This specifies 2 main data structures: struct heap - Defines a heap: Holds a table with all entries in the specific heap and the initial heap memory address struct heap_table - Describes the usage state of every PAGE within the specific heap. Signed-off-by: Carlos Maiolino <[email protected]>