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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user