mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-23 01:40:23 -05:00
Previously, there were two methods of working with the overmem condition: 1. hi/lo water callback - when the overmem condition was reached for the first time, the water callback was called with HIWATER mark and .is_overmem boolean was set internally. Similarly, when the used memory went below the lo water mark, the water callback would be called with LOWATER mark and .is_overmem was reset. This check would be called **every** time memory was allocated or freed. 2. isc_mem_isovermem() - a simple getter for the internal .is_overmem flag This commit refactors removes the first method and move the hi/lo water checks to the isc_mem_isovermem() function, thus we now have only a single method of checking overmem condition and the check for hi/lo water is removed from the hot path for memory contexts that doesn't use overmem checks. |
||
|---|---|---|
| .. | ||
| isc | ||
| .clang-format | ||