gint/src/kernel
Lephe 18f9a18925
kmalloc: implement a custom segregated list allocator
The new allocator uses a segregated best-fit algorithm with exact-size
lists for all sizes between 8 bytes (the minimum) and 60 bytes, one list
for blocks of size 64-252 and one for larger blocks.

Arenas managed by this allocator have built-in statistics that track
used and free memory (accounting for block headers), peak memory, and
various allocation results.

In addition, the allocator has self-checks in the form of integrity
verifications, that can be enabled with -DGINT_KMALLOC_DEBUG=1 at
configuration time or with the :dev configuration for GiteaPC. This is
used by gintctl.

The kmalloc interface is extended with a new arena covering all unused
memory in user RAM, managed by gint's allocator. It spans about 4 kB on
SH3 fx-9860G, 16 kB on SH4 fx-9860G, and 500 kB on fx-CG 50, in addition
to the OS heap. This new arena is now the default arena for malloc(),
except on SH3 where some heap problems are currently known.
2021-03-15 15:04:24 +01:00
..
cpu.h kernel: move VBR at the end of the user RAM area on fx-9860G 2021-02-15 09:46:59 +01:00
cpu.s kernel: move VBR at the end of the user RAM area on fx-9860G 2021-02-15 09:46:59 +01:00
drivers.h move src/core to src/kernel 2020-07-26 11:49:33 +02:00
exch.c kernel: dynamic loading of GMAPPED functions to user RAM 2020-09-17 14:48:54 +02:00
exch.s kernel: dynamic loading of GMAPPED functions to user RAM 2020-09-17 14:48:54 +02:00
hardware.c kernel: fix gint[HWURAM] not being set on fx-9860G 2021-02-02 18:18:02 +01:00
inth.S kernel: dynamic loading of GMAPPED functions to user RAM 2020-09-17 14:48:54 +02:00
kernel.c kmalloc: implement a custom segregated list allocator 2021-03-15 15:04:24 +01:00
kernel.h move src/core to src/kernel 2020-07-26 11:49:33 +02:00
osmenu.c move src/core to src/kernel 2020-07-26 11:49:33 +02:00
start.c small cleanup 2020-10-05 16:31:37 +02:00
syscalls.S kmalloc: create the kmalloc interface 2021-03-12 17:24:49 +01:00
tlbh.S kernel: dynamic loading of GMAPPED functions to user RAM 2020-09-17 14:48:54 +02:00
vbr.h kernel: dynamic loading of GMAPPED functions to user RAM 2020-09-17 14:48:54 +02:00