ck_hs: Optimize GC for empty sets.

ck_pring
Samy Al Bahra 11 years ago
parent 1fe1ed1d60
commit 3339b2eb22

@ -516,6 +516,14 @@ ck_hs_gc(struct ck_hs *hs, unsigned long cycles, unsigned long seed)
unsigned int maximum;
CK_HS_WORD *bounds = NULL;
if (map->n_entries == 0) {
ck_pr_store_uint(&map->probe_maximum, 0);
if (map->probe_bound != NULL)
memset(map->probe_bound, 0, sizeof(CK_HS_WORD) * map->capacity);
return true;
}
if (cycles == 0) {
maximum = 0;

Loading…
Cancel
Save