mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-08-17 21:25:50 +02:00
Auto-configure '-slabs' values (#1276)
- Auto-configure '-slabs' values to a power of 2 value close to num-threads by default for multi-threaded environments. Co-authored-by: Wouter Wijngaards <wcawijngaards@users.noreply.github.com>
This commit is contained in:
co-authored by
Wouter Wijngaards
parent
a904a3a2c2
commit
fcc21885e4
@@ -670,6 +670,7 @@ authtest_addzone(struct auth_zones* az, const char* name, char* fname)
|
||||
auth_zone_set_zonefile(z, fname);
|
||||
z->for_upstream = 1;
|
||||
cfg = config_create();
|
||||
config_auto_slab_values(cfg);
|
||||
free(cfg->chrootdir);
|
||||
cfg->chrootdir = NULL;
|
||||
|
||||
|
||||
@@ -131,6 +131,7 @@ void infra_test(void)
|
||||
unit_show_feature("infra cache");
|
||||
unit_assert(ipstrtoaddr("127.0.0.1", 53, &one, &onelen));
|
||||
|
||||
config_auto_slab_values(cfg);
|
||||
slab = infra_create(cfg);
|
||||
/* insert new record */
|
||||
unit_assert( infra_host(slab, &one, onelen, zone, zonelen, now,
|
||||
|
||||
@@ -267,6 +267,7 @@ static void zonemd_verify_test(char* zname, char* zfile, char* tastr,
|
||||
env.cfg = config_create();
|
||||
if(!env.cfg)
|
||||
fatal_exit("out of memory");
|
||||
config_auto_slab_values(env.cfg);
|
||||
env.now = &now;
|
||||
env.cfg->val_date_override = cfg_convert_timeval(date_override);
|
||||
if(!env.cfg->val_date_override)
|
||||
|
||||
Reference in New Issue
Block a user