summaryrefslogtreecommitdiffstats
path: root/source3/param/loadparm.c
diff options
context:
space:
mode:
authorGarming Sam <garming@catalyst.net.nz>2014-02-27 15:20:06 +1300
committerJeremy Allison <jra@samba.org>2014-05-07 19:49:14 +0200
commite812b726cd922e9ffd9ac035dbf8ebd700b1fc0b (patch)
treec6146c423c4a91e9c7c81f0bbf9293a5a2a8d329 /source3/param/loadparm.c
parent2dd7c890792cf12049ec13b88aa4e9de23035f9d (diff)
downloadsamba-e812b726cd922e9ffd9ac035dbf8ebd700b1fc0b.tar.gz
samba-e812b726cd922e9ffd9ac035dbf8ebd700b1fc0b.tar.xz
samba-e812b726cd922e9ffd9ac035dbf8ebd700b1fc0b.zip
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 <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-on: https://gerrit.samba.org/157 Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r--source3/param/loadparm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index fbfdb06d72..9b9ebe5bd1 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 ||