diff options
author | Max Kellermann <max@duempel.org> | 2008-08-29 09:39:08 +0200 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-09-02 00:20:20 -0700 |
commit | c82544458231694c197b0c967f6e2844e8612bc6 (patch) | |
tree | cb1d059950bcdbd31bb6f93a295fc393747df2a7 /src/stats.h | |
parent | ff13366268bde4493b431f50ae8fa8fcff2c9c80 (diff) | |
download | mpd-c82544458231694c197b0c967f6e2844e8612bc6.tar.gz mpd-c82544458231694c197b0c967f6e2844e8612bc6.tar.xz mpd-c82544458231694c197b0c967f6e2844e8612bc6.zip |
tag: try not to reallocate tag.items in every add() call
If many tag_items are added at once while the tag cache is being
loaded, manage these items in a static fixed list, instead of
reallocating the list with every newly created item. This reduces
heap fragmentation.
Massif results again:
mk before: total 12,837,632; useful 10,626,383; extra 2,211,249
mk now: total 12,736,720; useful 10,626,383; extra 2,110,337
The "useful" value is the same since this patch only changes the way
we allocate the same amount of memory, but heap fragmentation was
reduced by 5%.
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions