[PATCH] talloc: Tune talloc_vasprintf

Stefan (metze) Metzmacher metze at samba.org
Thu May 15 02:23:58 MDT 2014


Am 15.05.2014 10:23, schrieb Jeremy Allison:
> On Thu, May 15, 2014 at 10:19:53AM +0200, Volker Lendecke wrote:
>> On Thu, May 15, 2014 at 10:17:02AM +0200, Stefan (metze) Metzmacher wrote:
>>> Hi Volker,
>>>
>>>> A patch from my attic: In some profiles vsnprintf showed up
>>>> high from talloc_asprintf. This cuts vsnprintf use in
>>>> talloc_asprintf by half in most cases.
>>>>
>>>> Review would be appreciated!
>>>
>>> Do you think it would make sense to use PATH_MAX instead of 1024?
>>
>> Sure, we could do this. It's just that this routine has
>> nothing to do with file names or paths. PATH_MAX might make
>> people wonder why we refer to that in this routine.
>>
>> Any opinions?
> 
> I think PATH_MAX is too large. 1k is a reasonable
> size - plus it's the size Volker profiled.
> 
> I tihnk it's good as-is.

Ok :-)

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140515/79c7dea7/attachment.pgp>


More information about the samba-technical mailing list