mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Reclaim only what the new delegation needs
delegdb_cleanup() was overwriting the caller-supplied 'requested' value with (hiwater - lowater), so every overmem cleanup tried to free the full watermark band regardless of how much memory the new delegation actually needed. Drop the override so the caller's size is used: we now walk the SIEVE only until we have reclaimed enough room for the new node, leaving unrelated entries in place.
This commit is contained in:
parent
876a896f0f
commit
4d772cda3c
1 changed files with 0 additions and 1 deletions
|
|
@ -465,7 +465,6 @@ delegdb_cleanup(dns_qp_t *qp, dns_delegdb_t *delegdb, size_t requested) {
|
|||
if (!isc_mem_isovermem(delegdb->mctx)) {
|
||||
return;
|
||||
}
|
||||
requested = delegdb->hiwater - delegdb->lowater;
|
||||
|
||||
while (reclaimed < requested) {
|
||||
node = ISC_SIEVE_NEXT(delegdb->lru[isc_tid()], visited, link);
|
||||
|
|
|
|||
Loading…
Reference in a new issue