Dynamic memory allocators for real-time embedded systems need to fulfill three fundamental requirements: bounded worst-case execution time, fast average execution time, and minimal fragmentation.
Since embedded systems generally run continuously during their whole lifetime, fragmentation is one of the most important factors in designing the memory allocator.
This paper focuses on minimizing fragmentation while other requirements are still satisfied. To minimize fragmentation, a part of a memory region is segregated by the proposed budgeting method that exploits the memory profile of the given application.
It divides the heap storage into two parts, dedicated and shared, and reduces fragmentation by budgeting dedicated storage for predetermined objects. To budget the optimum size of dedicated storage, the budgeting method utilizes the given memory profile that traces when and which object is allocated and freed.
The budgeting method can be applied for any existing memory allocators. Experimental results show that the memory efficiency of allocators can be improved by up to 18.85% by using the budgeting method. Its worst-case execution time is analyzed to be bounded.
(To read this external content in full, download the paper from the authors’ ETRI archives. )