From: Ondřej Surý Date: Mon, 23 Jun 2025 05:48:36 +0000 (+0200) Subject: Print the memory context when printing overmem limits X-Git-Tag: v9.21.11~58^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51d7efbfb4b133f8716fca0cea53b5eff42fdccc;p=thirdparty%2Fbind9.git Print the memory context when printing overmem limits When printing the memory context going into or out of the overmem condition, also print the memory context name for easier debugging. --- diff --git a/lib/isc/mem.c b/lib/isc/mem.c index 9c0fd5657a0..e794453dd70 100644 --- a/lib/isc/mem.c +++ b/lib/isc/mem.c @@ -845,8 +845,8 @@ isc_mem_isovermem(isc_mem_t *ctx) { if ((isc_mem_debugging & ISC_MEM_DEBUGUSAGE) != 0) { fprintf(stderr, - "overmem mctx %p inuse %zu hi_water %zu\n", ctx, - inuse, hiwater); + "overmem %s mctx %p inuse %zu hi_water %zu\n", + ctx->name, ctx, inuse, hiwater); } atomic_store_relaxed(&ctx->stat[tid].is_overmem, true); @@ -865,8 +865,8 @@ isc_mem_isovermem(isc_mem_t *ctx) { if ((isc_mem_debugging & ISC_MEM_DEBUGUSAGE) != 0) { fprintf(stderr, - "overmem mctx %p inuse %zu lo_water %zu\n", ctx, - inuse, lowater); + "overmem %s mctx %p inuse %zu lo_water %zu\n", + ctx->name, ctx, inuse, lowater); } atomic_store_relaxed(&ctx->stat[tid].is_overmem, false); return false;