]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Limit the memory pool for the uvreqs
authorOndřej Surý <ondrej@isc.org>
Wed, 16 Aug 2023 14:55:02 +0000 (16:55 +0200)
committerOndřej Surý <ondrej@isc.org>
Mon, 21 Aug 2023 14:34:30 +0000 (16:34 +0200)
Set the number of maximum free items for the uvreq memory pool to 64.

lib/isc/netmgr/netmgr.c

index d4f2c2c7222738ac88a83b1f7d04c6a765e1508b..a6968f40a74595441f7dfc417aee1268487e37cc 100644 (file)
@@ -239,6 +239,7 @@ isc_netmgr_create(isc_mem_t *mctx, isc_loopmgr_t *loopmgr, isc_nm_t **netmgrp) {
 
                isc_mempool_create(worker->mctx, sizeof(isc__nm_uvreq_t),
                                   &worker->uvreq_pool);
+               isc_mempool_setfreemax(worker->uvreq_pool, ISC_NM_UVREQS_MAX);
 
                isc_loop_attach(loop, &worker->loop);
                isc_loop_teardown(loop, networker_teardown, worker);