You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a continuation/rework of commit fb9a377, which intended to
address the de-fragmentation issues where performance would drop.
Unfortunately, there were still memory allocation / releasing patterns
which still lead to heavy fragmentation. For example, an MI "dlg_list"
command, which allocates fragments from Left -> Right as the dialog list
is walked:
Chunk-1 Chunk-2 Chunk-3 ... Chunk-N
After building the MI output, the chunks were also freed Left -> Right.
Due to the former allocator logic of RHS-only coalescing, the coalescing
would never happen! In some cases, this could lead to fragmentation of
an indefinite amount of memory, given enough time (e.g., even 8 GB PKG).
This patch adds LHS coalescing to F_MALLOC, such that when "Chunk-2" is
freed, in the above example, the allocator tries to merge it with both
"Chunk-1" and "Chunk-3" before exiting the free() function (depending on
the state of chunks 1 and 3, this could mean 0, 1 or 2 coalescings).
This F_MALLOC patch was stress-tested using the mem/test/ testing suite.
Many thanks to @fedkis and @ankogan for helping troubleshoot the issue
and also test the current version of this patch!
Fixes#2726
0 commit comments