2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Set name for all the isc_mem context

The memory context for managers and dlz_dlopen_driver units had no name
and that was causing trouble with the statistics channel output.  Set
the name for the two memory context that were missing a proper name.

(cherry picked from commit 5d264b3329)
This commit is contained in:
Ondřej Surý
2025-04-25 13:01:16 +02:00
parent 66fc4ee86e
commit 1945fbc0dc
3 changed files with 3 additions and 0 deletions

View File

@@ -223,6 +223,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
} }
isc_mem_create(&mctx); isc_mem_create(&mctx);
isc_mem_setname(mctx, "named_dlz");
cd = isc_mem_get(mctx, sizeof(*cd)); cd = isc_mem_get(mctx, sizeof(*cd));
*cd = (dlopen_data_t){ *cd = (dlopen_data_t){
.mctx = mctx, .mctx = mctx,

View File

@@ -641,6 +641,7 @@ printversion(bool verbose) {
printf("threads support is enabled\n"); printf("threads support is enabled\n");
isc_mem_create(&mctx); isc_mem_create(&mctx);
isc_mem_setname(mctx, "main");
result = dst_lib_init(mctx, named_g_engine); result = dst_lib_init(mctx, named_g_engine);
if (result == ISC_R_SUCCESS) { if (result == ISC_R_SUCCESS) {
isc_buffer_init(&b, buf, sizeof(buf)); isc_buffer_init(&b, buf, sizeof(buf));

View File

@@ -22,6 +22,7 @@ isc_managers_create(isc_mem_t **mctxp, uint32_t workers,
REQUIRE(mctxp != NULL && *mctxp == NULL); REQUIRE(mctxp != NULL && *mctxp == NULL);
isc_mem_create(mctxp); isc_mem_create(mctxp);
INSIST(*mctxp != NULL); INSIST(*mctxp != NULL);
isc_mem_setname(*mctxp, "managers");
REQUIRE(loopmgrp != NULL && *loopmgrp == NULL); REQUIRE(loopmgrp != NULL && *loopmgrp == NULL);
isc_loopmgr_create(*mctxp, workers, loopmgrp); isc_loopmgr_create(*mctxp, workers, loopmgrp);