diff options
author | Maria Matejka <mq@ucw.cz> | 2022-11-01 08:56:26 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-11-01 16:38:24 +0100 |
commit | 37b644413723670928f6b54f2abe0c852eb0b652 (patch) | |
tree | d8e8023f23803d0117cf02f7ea1922d5d8e5f531 /conf/conf.c | |
parent | 5aebce5e0cc59c4c8459ab92a201df5868f46e7a (diff) |
Moved config-related allocations to config_pool and showing its size in memory usage
Diffstat (limited to 'conf/conf.c')
-rw-r--r-- | conf/conf.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/conf/conf.c b/conf/conf.c index 025c040e..11c136e7 100644 --- a/conf/conf.c +++ b/conf/conf.c @@ -61,6 +61,7 @@ static jmp_buf conf_jmpbuf; struct config *config, *new_config; +pool *config_pool; static struct config *old_config; /* Old configuration */ static struct config *future_config; /* New config held here if recon requested during recon */ @@ -89,7 +90,7 @@ int undo_available; /* Undo was not requested from last reconfiguration */ struct config * config_alloc(const char *name) { - pool *p = rp_new(&root_pool, "Config"); + pool *p = rp_new(config_pool, "Config"); linpool *l = lp_new_default(p); struct config *c = lp_allocz(l, sizeof(struct config)); @@ -491,10 +492,12 @@ config_timeout(timer *t UNUSED) void config_init(void) { - config_event = ev_new(&root_pool); + config_pool = rp_new(&root_pool, "Configurations"); + + config_event = ev_new(config_pool); config_event->hook = config_done; - config_timer = tm_new(&root_pool); + config_timer = tm_new(config_pool); config_timer->hook = config_timeout; } |