Report memory used by listener structures.
authorMichael Poole <mdpoole@troilus.org>
Mon, 30 May 2005 21:11:38 +0000 (21:11 +0000)
committerMichael Poole <mdpoole@troilus.org>
Mon, 30 May 2005 21:11:38 +0000 (21:11 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1418 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/s_debug.c

index 7d6d553d5531ac5c11942d26ccb8f89b47cf5c9c..149957ad9484c1be7da21d89d5d04e9651ceb835 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-05-30  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/s_debug.c (count_memory): Use count_listener_memory() to
+       report memory used by listener structures.
+
 2005-05-30  Michael Poole <mdpoole@troilus.org>
 
        * include/class.h (get_con_freq): Remove unused function.
index efa57eef352c5ad6f44f5982db6f4ca818581756..c1e6169e3d68d939a5238ec9f30b4f5bb5cd6fc9 100644 (file)
@@ -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