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

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.
This commit is contained in:
Ondřej Surý 2025-06-23 07:48:36 +02:00
parent 7682bc21a9
commit 51d7efbfb4
No known key found for this signature in database
GPG Key ID: 2820F37E873DEA41

View File

@ -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;