[PATCH] talloc_free_for_exit() and targeted write protection for talloc destructor
vl at samba.org
Mon Nov 28 20:12:44 UTC 2016
On Tue, Nov 29, 2016 at 07:13:53AM +1300, Andrew Bartlett wrote:
> As background, I want to make our LDAP server multi-process, and
> running a connect()/bind()/close() loop against the LDAP server showed
> a significant cost in talloc_free(ev) and talloc_autofree() just before
> This made me think about a way to make Samba 'forget' to call free() or
> inspect talloc children that did not have a destructor to fire.
Can we get this a lot more general by applying this principle for talloc
pools? If a talloc pool is clean, i.e. no destructors and no objects
"stolen" from it, we can just free the pool with one call to free(). This
would just achieve about the same and at the same time help with more
than just the exit case.
More information about the samba-technical