From c45149c33ea3c42fcdf94bb0ed381dc0f58a2ad8 Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Wed, 10 Nov 2004 12:26:48 +0000 Subject: 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 --- src/tagTracker.c | 5 +++++ 1 file changed, 5 insertions(+) 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; } -- cgit v1.2.3