mirror of
https://github.com/samba-team/samba.git
synced 2025-12-12 12:23:50 +03:00
r11962: Bring talloc up to date with Samba4, re-add the
talloc_describe_all() function. Fix smbcontrol <pid> pool-usage as we desparately need it working in the field to track down memory leaks. Seriously, when new functionality like the Samba4 talloc is added, don't just disable working functionality like "pool-usage", fix the damn thing first ! Jeremy.
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
abf761c8bf
commit
2e262a75cc
@@ -33,18 +33,23 @@
|
||||
void msg_pool_usage(int msg_type, struct process_id src_pid,
|
||||
void *UNUSED(buf), size_t UNUSED(len))
|
||||
{
|
||||
off_t reply;
|
||||
fstring reply_str;
|
||||
char *reply = NULL;
|
||||
|
||||
SMB_ASSERT(msg_type == MSG_REQ_POOL_USAGE);
|
||||
|
||||
DEBUG(2,("Got POOL_USAGE\n"));
|
||||
|
||||
reply = talloc_total_size(NULL);
|
||||
fstr_sprintf(reply_str, "%ld", (long)reply);
|
||||
reply = talloc_describe_all();
|
||||
if (!reply) {
|
||||
return;
|
||||
}
|
||||
|
||||
become_root();
|
||||
message_send_pid(src_pid, MSG_POOL_USAGE,
|
||||
reply_str, strlen(reply_str)+1, True);
|
||||
reply, strlen(reply)+1, True);
|
||||
unbecome_root();
|
||||
|
||||
SAFE_FREE(reply);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user