fix(lwip): LWIP memory/performanche heap optimization (IDFGH-16710)#17796
fix(lwip): LWIP memory/performanche heap optimization (IDFGH-16710)#17796jimmyw wants to merge 2 commits intoespressif:masterfrom
Conversation
This avoids one pointer indirection.
This avoids duplicated malloc, on a congested code path. Avoids additional heap overhead, increases speed and lowers memory usage.
π Hello jimmyw, we appreciate your contribution to this project! π Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. ποΈ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
6f55218 to
b410410
Compare
Description
Over a year ago i was hunting heap fragmentation in out BESS product. I noticed there was a lot of 4 bytes allocations, that really allocates space for one memory pointer. This is very inefficient.
On top of this, 5.3 that we where using at the time, but this 4 byte allocation in external ram, but the queue or semaphore referring to was placed in internal ram, causing a big performance issue. I think that very problem was sorted out now, by using mem_malloc but the other optimizations that i added that have been running flawlessly in our production for over a year is added here in my PR.