nuttx
nuttx copied to clipboard
mm/mm_heap: move user buffer cleanup outside mm_lock()
Summary
mm/mm_heap: move user buffer cleanup outside mm_lock()
- Move user buffer cleanup outside of mm_lock() to improve performance
- Fix free magic and posion mask is not set if hold mm_lock() failure
Signed-off-by: chao an [email protected]
Impact
N/A
Testing
ci-check
Doen't this make finding the culprit of the double free (the caller) harder to find?
Yes, This PR needs optimize further, we must guarantee the atomicity of MM_ALLOC_BIT, and the current master may also misjudge under SMP case.
Doen't this make finding the culprit of the double free (the caller) harder to find?
@davids5 Done, move the user memory cleanup outside of mm_lock() to improve RT performance
ping @anchao