zyfeier commented on PR #22180:
URL: https://github.com/apache/nuttx/pull/22180#issuecomment-7121210312

   Thanks for the review. Updated:
   
   1. Squashed each fix into the commit it fixes: the tlsf build fix and the 
two fill fixes are now part of "delayfree: add kmm_delayfree kumm_delayfree 
mm_delayfree api" (8 -> 5 commits). Every commit now builds on sim:ostest with 
the default heap, tlsf without KASAN and FILL_ALLOCATIONS, tlsf + mempool, and 
default heap + mempool + FILL_ALLOCATIONS.
   2. `get_delayhead()` is now called after `mm_lock_irq()` in 
`add_delaylist()` and `free_delaylist()`, for both mm_heap and tlsf.
   3. The heap mempool now skips the pools whose block is smaller than `struct 
mm_delaynode_s` (mm_initialize.c and mm_tlsf.c, also with 
`CONFIG_MM_MIN_BLKSIZE`). Verified on qemu-armv8a:nsh with tlsf, 
`MEMPOOL_THRESHOLD=64` and `FREE_DELAYCOUNT_MAX=8`: the block next to a 
`umm_delayfree()`d `malloc(8)` block was overwritten before and is intact now. 
The cost is that an 8-byte allocation now takes a 16-byte pool block on a 
64-bit CPU.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to