- for (mem = tempmempool->chain;mem;mem = mem->next)
- Con_Printf("%10i bytes allocated at %s:%i\n", mem->size, mem->filename, mem->fileline);
+ if ((pool->flags & POOLFLAG_TEMP) && pool->chain)
+ {
+ Con_Printf("Memory pool %p has sprung a leak totalling %i bytes (%.3fMB)! Listing contents...\n", pool, pool->totalsize, pool->totalsize / 1048576.0);
+ for (mem = pool->chain;mem;mem = mem->next)
+ Con_Printf("%10i bytes allocated at %s:%i\n", mem->size, mem->filename, mem->fileline);