From e812b726cd922e9ffd9ac035dbf8ebd700b1fc0b Mon Sep 17 00:00:00 2001 From: Garming Sam Date: Thu, 27 Feb 2014 15:20:06 +1300 Subject: [PATCH] param: change the talloc context attached to globals structure in s3 loadparm to a pool With many allocations being made, with many empty strings in loadparm, it should be more effective to use a talloc pool instead of a normal talloc context. The numbers chosen are based around a simple testparm instance. Signed-off-by: Garming Sam Reviewed-by: Andrew Bartlett Reviewed-on: https://gerrit.samba.org/157 Reviewed-by: Kamen Mazdrashki Reviewed-by: Jeremy Allison --- source3/param/loadparm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index fbfdb06d726..9b9ebe5bd15 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -678,7 +678,7 @@ static void init_globals(bool reinit_globals) * table once the defaults are set */ ZERO_STRUCT(Globals); - Globals.ctx = talloc_new(NULL); + Globals.ctx = talloc_pooled_object(NULL, char, 272, 2048); for (i = 0; parm_table[i].label; i++) { if ((parm_table[i].type == P_STRING || -- 2.11.4.GIT