aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-11-10 12:26:48 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-11-10 12:26:48 +0000
commitc45149c33ea3c42fcdf94bb0ed381dc0f58a2ad8 (patch)
tree7e2767973325d574751fe7d29f9cf02da64fd434
parent04a23441e116b8c7c6a8786a961dcafec2c789a5 (diff)
downloadmpd-c45149c33ea3c42fcdf94bb0ed381dc0f58a2ad8.tar.gz
mpd-c45149c33ea3c42fcdf94bb0ed381dc0f58a2ad8.tar.xz
mpd-c45149c33ea3c42fcdf94bb0ed381dc0f58a2ad8.zip
better tracking of saved memory by using tagTracker
git-svn-id: https://svn.musicpd.org/mpd/branches/r2562-metadata-handling-rewrite@2574 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r--src/tagTracker.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tagTracker.c b/src/tagTracker.c
index 23110c682..e7854a0e6 100644
--- a/src/tagTracker.c
+++ b/src/tagTracker.c
@@ -71,9 +71,14 @@ void printMemorySavedByTagTracker() {
for(i = 0; i < TAG_NUM_OF_ITEM_TYPES; i++) {
if(!tagLists[i]) continue;
+ sum -= sizeof(List);
+
node = tagLists[i]->firstNode;
while(node != NULL) {
+ sum -= sizeof(ListNode);
+ sum -= sizeof(int);
+ sum -= sizeof(node->key);
sum += (strlen(node->key)+1)*(*((int *)node->data));
node = node->nextNode;
}