Samba4 talloc in Samba3?
jra at samba.org
Sun Apr 24 21:10:32 GMT 2005
On Sun, Apr 24, 2005 at 10:54:41AM +0200, Volker Lendecke wrote:
> Attached find a patch to Samba3 that copies across the talloc implementation of
> Samba4 to Samba3. I had to remove the usage of talloc_destroy_pool,
> talloc_describe_all and talloc_strdup_w.
> The only one I'm not entirely sure about is the talloc_destroy_pool thing. Was
> this meant to be more than a performance optimization? And, did this actually
> gain is enough to be added to Samba4's talloc. In particular in
> printing/notify.c the semantics are changed slightly now. If talloc_init right
> after a talloc_free does not work, smbd panics now. But this is such a weird
> condition that smbd is in severe trouble anyway I think.
This is a very small change with very large semantic differences underneath :-).
In the words of "Marathon man"... "is it safe ?" :-) :-).
The only place talloc_destroy_pool is definately needed is in print_notify_send_messages() to
ensure all pending messages get cleaned up after send. You could replace this with
a talloc_destroy() followed by a re-initialization on the send_ctx.
How much have you valgrinded etc. this ?
More information about the samba-technical