The static atomic last_purge is only read and written from mem_purge(),
which is compiled only when JEMALLOC_API_SUPPORTED or __GLIBC__ is
defined. This used to fail on OpenBSD:
../lib/isc/mem.c:405:31: error: unused variable 'last_purge' [-Werror,-Wunused-variable]
405 | static _Atomic(isc_stdtime_t) last_purge = 0;
| ^~~~~~~~~~
}
static thread_local size_t freed_bytes = 0;
-static _Atomic(isc_stdtime_t) last_purge = 0;
constexpr size_t purge_threshold = (16 * 1024 * 1024);
#if defined(JEMALLOC_API_SUPPORTED) || defined(__GLIBC__)
+static _Atomic(isc_stdtime_t) last_purge = 0;
+
static void
mem_purge(void) {
isc_stdtime_t now = isc_stdtime_now();