diff options
author | Jeremy Allison <jra@samba.org> | 2002-12-20 20:23:06 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-12-20 20:23:06 +0000 |
commit | 842e08e52a665ae678eea239759bb2de1a0d7b33 (patch) | |
tree | d000cda1f530565beb52305474c8f7026b073706 /source/nsswitch/winbindd.c | |
parent | a2159610b9d38cc7cfa7cb877ccee816cd2206b8 (diff) | |
download | samba-842e08e52a665ae678eea239759bb2de1a0d7b33.tar.gz samba-842e08e52a665ae678eea239759bb2de1a0d7b33.tar.xz samba-842e08e52a665ae678eea239759bb2de1a0d7b33.zip |
Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
Diffstat (limited to 'source/nsswitch/winbindd.c')
-rw-r--r-- | source/nsswitch/winbindd.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index b4d1773e9ce..61e585902ce 100644 --- a/source/nsswitch/winbindd.c +++ b/source/nsswitch/winbindd.c @@ -58,6 +58,25 @@ static BOOL reload_services_file(BOOL test) return(ret); } +/******************************************************************* + Print out all talloc memory info. +********************************************************************/ + +void return_all_talloc_info(int msg_type, pid_t src_pid, void *buf, size_t len) +{ + TALLOC_CTX *ctx = talloc_init("info context"); + char *info = NULL; + + if (!ctx) + return; + + info = talloc_describe_all(ctx); + if (info) + DEBUG(10,(info)); + message_send_pid(src_pid, MSG_TALLOC_USAGE, info, info ? strlen(info) + 1: 0, True); + talloc_destroy(ctx); +} + #if DUMP_CORE /**************************************************************************** ** @@ -864,6 +883,7 @@ static void usage(void) } register_msg_pool_usage(); + message_register(MSG_REQ_TALLOC_USAGE, return_all_talloc_info); /* Loop waiting for requests */ |