Merge branch '248-named-9-12-uses-too-much-memory-with-tuning-large-regression-vs-9-11' into 'master'
Resolve "named 9.12 uses too much memory with `--tuning=large` (regression vs. 9.11)" Closes #248 See merge request isc-projects/bind9!251
This commit is contained in:
5
CHANGES
5
CHANGES
@@ -1,3 +1,8 @@
|
||||
4943. [bug] Change 4687 consumed too much memory when running
|
||||
system tests with --with-tuning=large. Reduced the
|
||||
hash table size to 512 entries for 'named -m record'
|
||||
restoring the previous memory footprint. [GL #248]
|
||||
|
||||
4942. [cleanup] Consolidate multiple instances of splitting of
|
||||
batchline in dig into a single function. [GL #196]
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ LIBISC_EXTERNAL_DATA unsigned int isc_mem_defaultflags = ISC_MEMFLAG_DEFAULT;
|
||||
#define ALIGNMENT_SIZE 8U /*%< must be a power of 2 */
|
||||
#define NUM_BASIC_BLOCKS 64 /*%< must be > 1 */
|
||||
#define TABLE_INCREMENT 1024
|
||||
#define DEBUG_TABLE_COUNT 65536
|
||||
#define DEBUG_TABLE_COUNT 512U
|
||||
|
||||
/*
|
||||
* Types.
|
||||
@@ -395,17 +395,6 @@ add_trace_entry(isc__mem_t *mctx, const void *ptr, size_t size FLARG) {
|
||||
hash = isc_hash_function(&ptr, sizeof(ptr), ISC_TRUE, NULL);
|
||||
idx = hash % DEBUG_TABLE_COUNT;
|
||||
|
||||
dl = ISC_LIST_TAIL(mctx->debuglist[idx]);
|
||||
if (ISC_LIKELY(dl != NULL && dl->ptr == NULL)) {
|
||||
ISC_LIST_UNLINK(mctx->debuglist[idx], dl, link);
|
||||
dl->ptr = ptr;
|
||||
dl->size = size;
|
||||
dl->file = file;
|
||||
dl->line = line;
|
||||
ISC_LIST_PREPEND(mctx->debuglist[idx], dl, link);
|
||||
return;
|
||||
}
|
||||
|
||||
dl = malloc(sizeof(debuglink_t));
|
||||
INSIST(dl != NULL);
|
||||
mctx->malloced += sizeof(debuglink_t);
|
||||
@@ -444,14 +433,11 @@ delete_trace_entry(isc__mem_t *mctx, const void *ptr, size_t size,
|
||||
idx = hash % DEBUG_TABLE_COUNT;
|
||||
|
||||
dl = ISC_LIST_HEAD(mctx->debuglist[idx]);
|
||||
while (ISC_LIKELY(dl != NULL && dl->ptr != NULL)) {
|
||||
while (ISC_LIKELY(dl != NULL)) {
|
||||
if (ISC_UNLIKELY(dl->ptr == ptr)) {
|
||||
ISC_LIST_UNLINK(mctx->debuglist[idx], dl, link);
|
||||
dl->ptr = NULL;
|
||||
dl->size = 0;
|
||||
dl->file = NULL;
|
||||
dl->line = 0;
|
||||
ISC_LIST_APPEND(mctx->debuglist[idx], dl, link);
|
||||
mctx->malloced -= sizeof(*dl);
|
||||
free(dl);
|
||||
return;
|
||||
}
|
||||
dl = ISC_LIST_NEXT(dl, link);
|
||||
|
||||
Reference in New Issue
Block a user