[PATCH] cleanup in passdb

Kamen Mazdrashki kamenim at samba.org
Tue Nov 18 12:21:44 MST 2014


On Tue, Nov 18, 2014 at 4:38 PM, Volker Lendecke <Volker.Lendecke at sernet.de>
wrote:

> On Tue, Nov 18, 2014 at 03:50:40PM +0100, Kamen Mazdrashki wrote:
> > Out of curiosity - why is the first change needed?
> > I guess talloc_pooled_object() allocated pool is going to give us some
> > performance boost
> > during memory allocation/deallocation?
>
> It's not needed. It only does one malloc for the whole object. So the
> hope is that it's faster. But it also makes sure that if you get the
> length calculation right it will never fail the suballocations. The
> alternative patch would be to add NULL checks to all talloc_strdup calls.
>
> Nice, thanks. I didn't know about talloc_pooled_object()
5 strlens should be faster than 5 branching + 5 full talloc/free  op for
sure :)

Best regards,
Kamen

With best regards,
>
> Volker Lendecke
>
> --
> SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
> phone: +49-551-370000-0, fax: +49-551-370000-9
> AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
> http://www.sernet.de, mailto:kontakt at sernet.de
>


More information about the samba-technical mailing list