2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Improve performance of RBT (#41165)

This commit is contained in:
Mukund Sivaraman
2015-12-09 19:07:20 +05:30
parent aeb7b6e145
commit 5d79b60fc5
17 changed files with 555 additions and 237 deletions

View File

@@ -7729,20 +7729,20 @@ nodecount(dns_db_t *db) {
return (count);
}
static unsigned int
static size_t
hashsize(dns_db_t *db) {
dns_rbtdb_t *rbtdb;
unsigned int count;
size_t size;
rbtdb = (dns_rbtdb_t *)db;
REQUIRE(VALID_RBTDB(rbtdb));
RWLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
count = dns_rbt_hashsize(rbtdb->tree);
size = dns_rbt_hashsize(rbtdb->tree);
RWUNLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
return (count);
return (size);
}
static void