mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 07:35:26 +00:00
Repack dns_rbtnode struct to gain some space (reduce packing holes) (#41854)
This commit is contained in:
@@ -83,22 +83,6 @@ struct dns_rbtnode {
|
|||||||
#if DNS_RBT_USEMAGIC
|
#if DNS_RBT_USEMAGIC
|
||||||
unsigned int magic;
|
unsigned int magic;
|
||||||
#endif
|
#endif
|
||||||
dns_rbtnode_t *parent;
|
|
||||||
dns_rbtnode_t *left;
|
|
||||||
dns_rbtnode_t *right;
|
|
||||||
dns_rbtnode_t *down;
|
|
||||||
#ifdef DNS_RBT_USEHASH
|
|
||||||
dns_rbtnode_t *uppernode;
|
|
||||||
dns_rbtnode_t *hashnext;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*%
|
|
||||||
* Used for LRU cache. This linked list is used to mark nodes which
|
|
||||||
* have no data any longer, but we cannot unlink at that exact moment
|
|
||||||
* because we did not or could not obtain a write lock on the tree.
|
|
||||||
*/
|
|
||||||
ISC_LINK(dns_rbtnode_t) deadlink;
|
|
||||||
|
|
||||||
/*@{*/
|
/*@{*/
|
||||||
/*!
|
/*!
|
||||||
* The following bitfields add up to a total bitwidth of 32.
|
* The following bitfields add up to a total bitwidth of 32.
|
||||||
@@ -130,9 +114,32 @@ struct dns_rbtnode {
|
|||||||
/* node needs to be cleaned from rpz */
|
/* node needs to be cleaned from rpz */
|
||||||
unsigned int rpz : 1;
|
unsigned int rpz : 1;
|
||||||
|
|
||||||
|
/*@{*/
|
||||||
|
/*!
|
||||||
|
* These values are used in the RBT DB implementation. The appropriate
|
||||||
|
* node lock must be held before accessing them.
|
||||||
|
*/
|
||||||
|
unsigned int dirty:1;
|
||||||
|
unsigned int wild:1;
|
||||||
|
unsigned int locknum:DNS_RBT_LOCKLENGTH;
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
#ifdef DNS_RBT_USEHASH
|
#ifdef DNS_RBT_USEHASH
|
||||||
unsigned int hashval;
|
unsigned int hashval;
|
||||||
|
dns_rbtnode_t *uppernode;
|
||||||
|
dns_rbtnode_t *hashnext;
|
||||||
#endif
|
#endif
|
||||||
|
dns_rbtnode_t *parent;
|
||||||
|
dns_rbtnode_t *left;
|
||||||
|
dns_rbtnode_t *right;
|
||||||
|
dns_rbtnode_t *down;
|
||||||
|
|
||||||
|
/*%
|
||||||
|
* Used for LRU cache. This linked list is used to mark nodes which
|
||||||
|
* have no data any longer, but we cannot unlink at that exact moment
|
||||||
|
* because we did not or could not obtain a write lock on the tree.
|
||||||
|
*/
|
||||||
|
ISC_LINK(dns_rbtnode_t) deadlink;
|
||||||
|
|
||||||
/*@{*/
|
/*@{*/
|
||||||
/*!
|
/*!
|
||||||
@@ -140,9 +147,6 @@ struct dns_rbtnode {
|
|||||||
* node lock must be held before accessing them.
|
* node lock must be held before accessing them.
|
||||||
*/
|
*/
|
||||||
void *data;
|
void *data;
|
||||||
unsigned int dirty:1;
|
|
||||||
unsigned int wild:1;
|
|
||||||
unsigned int locknum:DNS_RBT_LOCKLENGTH;
|
|
||||||
#ifndef DNS_RBT_USEISCREFCOUNT
|
#ifndef DNS_RBT_USEISCREFCOUNT
|
||||||
unsigned int references:DNS_RBT_REFLENGTH;
|
unsigned int references:DNS_RBT_REFLENGTH;
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user