extend wizard-mode '#stats' command

Extend #stats beyond just monsters and objects.  Have it display
memory usage for traps, engravings, light sources, timers, pending
shop wall/floor repair, regions, bones tracking, named object types,
and dungeon overview.

No doubt there are other memory consumers that I've overlooked.
This commit is contained in:
PatR
2016-04-16 15:37:35 -07:00
parent 41ade6d37d
commit 953ee96f7e
8 changed files with 333 additions and 62 deletions

View File

@@ -1998,6 +1998,23 @@ long adjust; /* how much to adjust timeout */
}
}
/* to support '#stats' wizard-mode command */
void
timer_stats(hdrfmt, hdrbuf, count, size)
const char *hdrfmt;
char *hdrbuf;
long *count, *size;
{
timer_element *te;
Sprintf(hdrbuf, hdrfmt, (long) sizeof (timer_element));
*count = *size = 0L;
for (te = timer_base; te; te = te->next) {
++*count;
*size += (long) sizeof *te;
}
}
/* reset all timers that are marked for reseting */
void
relink_timers(ghostly)