From 779d7bb70418324659075f1ea9b118895522ee4d Mon Sep 17 00:00:00 2001 From: molivier Date: Sun, 18 Sep 2005 16:36:14 +0000 Subject: [PATCH] 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 --- zone.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.39.2