#include "ircd_reply.h"
#include "ircd.h"
#include "list.h"
+#include "msgq.h"
#include "numeric.h"
#include "numnicks.h"
#include "res.h"
com = 0, /* memory used by conf lines */
dbufs_allocated = 0, /* memory used by dbufs */
dbufs_used = 0, /* memory used by dbufs */
+ msg_allocated = 0, /* memory used by struct Msg */
+ msg_used = 0, /* memory used by struct Msg */
+ msgbuf_allocated = 0, /* memory used by struct MsgBuf */
+ msgbuf_used = 0, /* memory used by struct MsgBuf */
rm = 0, /* res memory used */
totcl = 0, totch = 0, totww = 0, tot = 0;
":DBufs allocated %d(%zu) used %d(%zu)", DBufAllocCount,
dbufs_allocated, DBufUsedCount, dbufs_used);
+ msgq_count_memory(&msg_allocated, &msg_used, &msgbuf_allocated,
+ &msgbuf_used);
+ send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
+ ":Msgs allocated %d(%zu) used %d(%zu)", msgCounts.alloc,
+ msg_allocated, msgCounts.used, msg_used);
+ send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
+ ":MsgBufs allocated %d(%zu) used %d(%zu)", msgBufCounts.alloc,
+ msgbuf_allocated, msgBufCounts.used, msgbuf_used);
+
rm = cres_mem(cptr);
tot =
- totww + totch + totcl + com + cl * sizeof(struct ConnectionClass) + dbufs_allocated +
- rm;
+ totww + totch + totcl + com + cl * sizeof(struct ConnectionClass) +
+ dbufs_allocated + msg_allocated + msgbuf_allocated + rm;
tot += sizeof(void *) * HASHSIZE * 3;
#if !defined(NDEBUG)
#endif
send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
- ":Total: ww %zu ch %zu cl %zu co %zu db %zu", totww, totch,
- totcl, com, dbufs_allocated);
+ ":Total: ww %zu ch %zu cl %zu co %zu db %zu ms %zu mb %zu",
+ totww, totch, totcl, com, dbufs_allocated, msg_allocated,
+ msgbuf_allocated);
}