array_push(worker->pools, mp_context);
} else {
mp_delete(mp_context);
+ }
#if defined(__GLIBC__) && defined(_GNU_SOURCE)
- /* Decommit memory every once in a while */
- static size_t mp_delete_count = 0;
- if (++mp_delete_count == 100 * MP_FREELIST_SIZE) {
- malloc_trim(0);
- mp_delete_count = 0;
- }
-#endif
+ /* Decommit memory every once in a while */
+ static size_t mp_delete_count = 0;
+ if (++mp_delete_count == 100 * MP_FREELIST_SIZE) {
+ malloc_trim(0);
+ mp_delete_count = 0;
}
+#endif
}
static void qr_task_timeout(uv_timer_t *req)
update_nsrep(ns, (const knot_dname_t *)k, addr, score);
ns->reputation = reputation;
} else {
- /* With 10% chance, probe server with a probability given by its RTT / MAX_RTT */
- if ((kr_rand_uint(100) < 10) && (kr_rand_uint(KR_NS_MAX_SCORE) >= score)) {
+ /* With 5% chance, probe server with a probability given by its RTT / MAX_RTT */
+ if ((kr_rand_uint(100) < 5) && (kr_rand_uint(KR_NS_MAX_SCORE) >= score)) {
/* If this is a low-reliability probe, go with TCP to get ICMP reachability check. */
if (score >= KR_NS_LONG) {
qry->flags |= QUERY_TCP;