From db67c85ff466c6da179da6d553a7f88165906b37 Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Mon, 30 May 2005 21:11:38 +0000 Subject: [PATCH] Report memory used by listener structures. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1418 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 5 +++++ ircd/s_debug.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7d6d553..149957a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-05-30 Michael Poole + + * ircd/s_debug.c (count_memory): Use count_listener_memory() to + report memory used by listener structures. + 2005-05-30 Michael Poole * include/class.h (get_con_freq): Remove unused function. diff --git a/ircd/s_debug.c b/ircd/s_debug.c index efa57ee..c1e6169 100644 --- a/ircd/s_debug.c +++ b/ircd/s_debug.c @@ -37,6 +37,7 @@ #include "ircd.h" #include "jupe.h" #include "list.h" +#include "listener.h" #include "motd.h" #include "msgq.h" #include "numeric.h" @@ -223,6 +224,7 @@ void count_memory(struct Client *cptr, const struct StatDesc *sd, wwu = 0, /* whowas users */ cl = 0, /* classes */ co = 0, /* conf lines */ + listeners = 0, /* listeners */ memberships = 0; /* channel memberships */ int usi = 0, /* users invited */ @@ -247,6 +249,7 @@ void count_memory(struct Client *cptr, const struct StatDesc *sd, dbufs_used = 0, /* memory used by dbufs */ msg_allocated = 0, /* memory used by struct Msg */ msgbuf_allocated = 0, /* memory used by struct MsgBuf */ + listenersm = 0, /* memory used by listetners */ rm = 0, /* res memory used */ totcl = 0, totch = 0, totww = 0, tot = 0; @@ -357,6 +360,9 @@ void count_memory(struct Client *cptr, const struct StatDesc *sd, ":Hash: client %d(%zu), chan is the same", HASHSIZE, sizeof(void *) * HASHSIZE); + count_listener_memory(&listeners, &listenersm); + send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, + ":Listeners allocated %d(%zu)", listeners, listenersm); /* * NOTE: this count will be accurate only for the exact instant that this * message is being sent, so the count is affected by the dbufs that -- 2.20.1