From: molivier Date: Sun, 18 Sep 2005 16:36:14 +0000 (+0000) Subject: Made Mem_PrintStats also print the real allocated size (including structures used... X-Git-Tag: xonotic-v0.1.0preview~4557 X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=779d7bb70418324659075f1ea9b118895522ee4d Made Mem_PrintStats also print the real allocated size (including structures used by the memory system) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5724 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/zone.c b/zone.c index 0f1678d8..ced5e82e 100644 --- a/zone.c +++ b/zone.c @@ -383,7 +383,7 @@ mempool_t *zonemempool; void Mem_PrintStats(void) { - size_t count = 0, size = 0; + size_t count = 0, size = 0, realsize = 0; mempool_t *pool; memheader_t *mem; Mem_CheckSentinelsGlobal(); @@ -391,8 +391,10 @@ void Mem_PrintStats(void) { count++; size += pool->totalsize; + realsize += pool->realsize; } Con_Printf("%lu memory pools, totalling %lu bytes (%.3fMB)\n", (unsigned long)count, (unsigned long)size, size / 1048576.0); + Con_Printf("total allocated size: %lu bytes (%.3fMB)\n", (unsigned long)realsize, realsize / 1048576.0); for (pool = poolchain;pool;pool = pool->next) { if ((pool->flags & POOLFLAG_TEMP) && pool->chain)