diff options
author | Martin Pool <mbp@samba.org> | 2002-01-03 05:52:27 +0000 |
---|---|---|
committer | Martin Pool <mbp@samba.org> | 2002-01-03 05:52:27 +0000 |
commit | cfec6d4498f9e5eea4e1fcae3bdcf92accbe5872 (patch) | |
tree | cce934f823a6f52d8becff7414edcc87d3d7ce1d /source3 | |
parent | 34b9c7cee2ef4da1fd9b52cd7ab65bf261f3a8ea (diff) | |
download | samba-cfec6d4498f9e5eea4e1fcae3bdcf92accbe5872.tar.gz samba-cfec6d4498f9e5eea4e1fcae3bdcf92accbe5872.tar.bz2 samba-cfec6d4498f9e5eea4e1fcae3bdcf92accbe5872.zip |
Cope nicely with pools with no name.
(This used to be commit 86abefc17260387b6b68c71ad5587ef0212162c0)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/talloc.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/lib/talloc.c b/source3/lib/talloc.c index 01a6e19bb2..bd9080dc34 100644 --- a/source3/lib/talloc.c +++ b/source3/lib/talloc.c @@ -371,10 +371,19 @@ char *talloc_describe_all(TALLOC_CTX *rt) for (it = list_head; it; it = it->next_ctx) { size_t bytes; int n_chunks; + fstring what; + n_pools++; + talloc_get_allocation(it, &bytes, &n_chunks); + + if (it->name) + fstrcpy(what, it->name); + else + slprintf(what, sizeof what, "@%p", it); + s = talloc_asprintf_append(rt, s, "%-40s %8u %8u\n", - it->name, + what, (unsigned) n_chunks, (unsigned) bytes); total_bytes += bytes; |