RTEMS | Refactor the first-fit heap implementation for modular allocator support (#5620)

mazen Adel (@mez3n) gitlab at rtems.org
Wed Jun 10 09:39:42 UTC 2026



mazen Adel created an issue: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5620



## Summary

<!--Please provide as much information as possible such as error messages or attaching logs-->

As part of the GSoC 2026 modular heap support project, I need to refactor the current first-fit heap implementation to provide a generic framework for adding new heap implementations through a common interface.

Currently, the first-fit heap implementation is spread across multiple files, including heap.h, heapimpl.h, and several .c files. The header files contain both declarations and implementations of some helper functions, while the larger functions are implemented in the corresponding source files.

The current approach under consideration is:

- heap.h will contain only the public API and interfaces that are generic to all heap implementations.
- heapimpl.h will contain internal helper functions and definitions that are generic to any allocator implementation.
- Each allocator will have its own implementation-specific files. For example, the first-fit allocator would use heapfirstfitimpl.h and its corresponding source file.

This approach may change as the work progresses. I will update this issue if a better approach is considered or any changes are made to the current structure.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5620
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260610/d38e88ef/attachment-0001.htm>


More information about the bugs mailing list