From 51d7efbfb4b133f8716fca0cea53b5eff42fdccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Mon, 23 Jun 2025 07:48:36 +0200 Subject: [PATCH] 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. --- lib/isc/mem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/isc/mem.c b/lib/isc/mem.c index 9c0fd5657a..e794453dd7 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;