mazen Adel commented: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5633#note_156480


It should be noted that I was able to reuse only two algorithm-independent 
helper functions from the existing RTEMS Heap Handler: \_Heap_Align_down() and 
\_Heap_Align_up().

Reusing additional helpers was difficult for two main reasons. First, TLSF and 
first-fit use different blockdata and flags. TLSF stores an additional flag 
indicating whether the current block is used, However first-fit gets this 
information from the next block. Changing this is possible, but it would 
require modifications to the TLSF logic.

I modified the TLSF block structure so that its physical layout matches the 
first-fit block structure when heap protection is disabled. However, I have not 
yet replaced Heap_Tlsf_Block with Heap_Block. If the remaining metadata and 
header differences are handled, TLSF could reuse at least three additional 
helpers: 

* \_Heap_Block_at() instead of \_Heap_Tlsf_Block_at().
* \_Heap_Prev_block() instead of \_Heap_Tlsf_Block_prev().
* \_Heap_Alloc_area_of_block() instead of \_Heap_Tlsf_Block_to_ptr().

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5633#note_156480
You're receiving this email because of your account on gitlab.rtems.org. 
Unsubscribe from this thread: 
https://gitlab.rtems.org/-/sent_notifications/5-bj3r51zsobzkdznq4p9kxh43u-1d/unsubscribe
 | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | 
Help: https://gitlab.rtems.org/help


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to