This is a GSoC 2026 project including 2 main tasks:
- Update the current memory allocator to use TLSF instead of first fit
- Add support for C11 Annex K Bounds Checking Functions
The first task is to update the implementation in heap.c to use TLSF which is a dynamic memory allocator specifically designed for real‑time operating systems since the current first-fit memory allocator of RTEMS has serious fragmentation issues and an unpredictable runtime. I talked about this in more detail here.
The second task is to Add support for C11 Annex K Bounds Checking Functions. This will require looking into the current open source implementations of these functions and checking which implementation provides the most complete set and ensuring the license is ok. After finishing this research we will need to figure out how to make them available in RTEMS. This includes mainly 2 options:
- integration with newlib
- Adding the library to the tool chain build
The second option is most likely since it is no longer is desirable to have code merged into newlib.
The original issue already mentions that safelibc is currently the best candidate for this.
I welcome feedback, suggestions, or modifications on this project.