mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-08-24 16:42:29 +02:00
Alloc cache per thread gets used for deleted items.
git-svn-id: file:///svn/unbound/trunk@280 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
@@ -233,8 +233,8 @@ test_short_table(struct lruhash* table)
|
||||
k->entry.data = d;
|
||||
k2->entry.data = d2;
|
||||
|
||||
lruhash_insert(table, myhash(12), &k->entry, d);
|
||||
lruhash_insert(table, myhash(14), &k2->entry, d2);
|
||||
lruhash_insert(table, myhash(12), &k->entry, d, NULL);
|
||||
lruhash_insert(table, myhash(14), &k2->entry, d2, NULL);
|
||||
|
||||
unit_assert( lruhash_lookup(table, myhash(12), k, 0) == &k->entry);
|
||||
lock_rw_unlock( &k->entry.lock );
|
||||
@@ -255,7 +255,7 @@ testadd(struct lruhash* table, struct testdata* ref[])
|
||||
struct testdata* data = newdata(numtoadd);
|
||||
struct testkey* key = newkey(numtoadd);
|
||||
key->entry.data = data;
|
||||
lruhash_insert(table, myhash(numtoadd), &key->entry, data);
|
||||
lruhash_insert(table, myhash(numtoadd), &key->entry, data, NULL);
|
||||
ref[numtoadd] = data;
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ testadd_unlim(struct lruhash* table, struct testdata** ref)
|
||||
struct testdata* data = newdata(numtoadd);
|
||||
struct testkey* key = newkey(numtoadd);
|
||||
key->entry.data = data;
|
||||
lruhash_insert(table, myhash(numtoadd), &key->entry, data);
|
||||
lruhash_insert(table, myhash(numtoadd), &key->entry, data, NULL);
|
||||
if(ref)
|
||||
ref[numtoadd] = data;
|
||||
}
|
||||
|
||||
@@ -110,8 +110,8 @@ test_short_table(struct slabhash* table)
|
||||
k->entry.data = d;
|
||||
k2->entry.data = d2;
|
||||
|
||||
slabhash_insert(table, myhash(12), &k->entry, d);
|
||||
slabhash_insert(table, myhash(14), &k2->entry, d2);
|
||||
slabhash_insert(table, myhash(12), &k->entry, d, NULL);
|
||||
slabhash_insert(table, myhash(14), &k2->entry, d2, NULL);
|
||||
|
||||
unit_assert( slabhash_lookup(table, myhash(12), k, 0) == &k->entry);
|
||||
lock_rw_unlock( &k->entry.lock );
|
||||
@@ -132,7 +132,7 @@ testadd(struct slabhash* table, struct slabtestdata* ref[])
|
||||
struct slabtestdata* data = newdata(numtoadd);
|
||||
struct slabtestkey* key = newkey(numtoadd);
|
||||
key->entry.data = data;
|
||||
slabhash_insert(table, myhash(numtoadd), &key->entry, data);
|
||||
slabhash_insert(table, myhash(numtoadd), &key->entry, data, NULL);
|
||||
ref[numtoadd] = data;
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ testadd_unlim(struct slabhash* table, struct slabtestdata** ref)
|
||||
struct slabtestdata* data = newdata(numtoadd);
|
||||
struct slabtestkey* key = newkey(numtoadd);
|
||||
key->entry.data = data;
|
||||
slabhash_insert(table, myhash(numtoadd), &key->entry, data);
|
||||
slabhash_insert(table, myhash(numtoadd), &key->entry, data, NULL);
|
||||
if(ref)
|
||||
ref[numtoadd] = data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user