+4607. [bug] The memory context's malloced and maxmalloced counters
+ were being updated without the appropriate lock being
+ held. [RT #44869]
+
4606. [port] Stop using experimental "Experimental keys on scalar"
feature of perl as it has been removed. [RT #45012]
ret[size-1] = 0xbe;
# endif
#endif
- if (ret != NULL) {
- ctx->malloced += size;
- if (ctx->malloced > ctx->maxmalloced)
- ctx->maxmalloced = ctx->malloced;
- }
return (ret);
}
mem_put(isc__mem_t *ctx, void *mem, size_t size) {
#if ISC_MEM_CHECKOVERRUN
INSIST(((unsigned char *)mem)[size] == 0xbe);
+ size += 1;
#endif
#if ISC_MEM_FILL
memset(mem, 0xde, size); /* Mnemonic for "dead". */
#endif
(ctx->memfree)(ctx->arg, mem);
-#if ISC_MEM_CHECKOVERRUN
- size += 1;
-#endif
- ctx->malloced -= size;
}
/*!
ctx->stats[size].gets++;
ctx->stats[size].totalgets++;
}
+
+#if ISC_MEM_CHECKOVERRUN
+ size += 1;
+#endif
+ ctx->malloced += size;
+ if (ctx->malloced > ctx->maxmalloced)
+ ctx->maxmalloced = ctx->malloced;
}
/*!
INSIST(ctx->stats[size].gets > 0U);
ctx->stats[size].gets--;
}
+#if ISC_MEM_CHECKOVERRUN
+ size += 1;
+#endif
+ ctx->malloced -= size;
}
/*