[PATCH] talloc: Tune talloc_vasprintf
jra at samba.org
Thu May 15 02:23:07 MDT 2014
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.
More information about the samba-technical