[PATCH 0/3] Heap Enhancements

Samuel Holland samuel.holland at sifive.com
Mon Jun 16 20:21:34 PDT 2025


This series fixes an issue observed where allocations can fail, even
when there is sufficient free space in the heap, because the heap runs
out of list nodes. A follow-up commit simplifies the code and helps to
keep the free space list sorted by address.


Samuel Holland (3):
  lib: sbi_list: Add a helper for reverse list iteration
  lib: sbi_heap: Allocate list nodes dynamically
  lib: sbi_heap: Simplify allocation algorithm

 include/sbi/sbi_list.h |  11 ++++
 lib/sbi/sbi_heap.c     | 129 +++++++++++++++++++++--------------------
 2 files changed, 77 insertions(+), 63 deletions(-)

-- 
2.47.2

base-commit: 324021423d063702a5cb2d4207a3a9c4e999549f
branch: up/heap-fix



More information about the opensbi mailing list