diff options
author | Maria Matejka <mq@ucw.cz> | 2021-11-30 18:16:49 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2021-11-30 21:38:25 +0100 |
commit | 385b3ea3956aefc2868cdd838fc0a90f1d8a7857 (patch) | |
tree | d954b853724153e4a2411d57be5f29e5b9236251 /nest/rt-attr.c | |
parent | ab0994a10c26bd76b4154a675267d96d19dfb509 (diff) |
For safer memory allocations, resources are bound to loops.
Also all loops have their basic resource pool for allocations which are
auto-freed when the loop is stopping.
Diffstat (limited to 'nest/rt-attr.c')
-rw-r--r-- | nest/rt-attr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nest/rt-attr.c b/nest/rt-attr.c index 9a5498ed..357cd216 100644 --- a/nest/rt-attr.c +++ b/nest/rt-attr.c @@ -117,7 +117,7 @@ static void rte_src_init(void) { src_domain = DOMAIN_NEW(attrs, "Route sources"); - src_pool = rp_new(&root_pool, "Route sources"); + src_pool = rp_new(&root_pool, &main_birdloop, "Route sources"); rte_src_slab = sl_new(src_pool, sizeof(struct rte_src)); idm_init(&src_ids, src_pool, SRC_ID_INIT_SIZE); @@ -1534,7 +1534,7 @@ rta_init(void) { attrs_domain = DOMAIN_NEW(attrs, "Attributes"); - rta_pool = rp_new(&root_pool, "Attributes"); + rta_pool = rp_new(&root_pool, &main_birdloop, "Attributes"); rta_slab_[0] = sl_new(rta_pool, sizeof(rta)); rta_slab_[1] = sl_new(rta_pool, sizeof(rta) + sizeof(u32)); |