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

Optimize memory layout of core structs

Reduce memory footprint by:

 - Reordering struct fields to minimize padding.
 - Using exact-sized atomic types instead of *_least/*_fast variants
 - Downsizing integer fields where possible

Affected structs:

 - dns_name_t
 - dns_slabheader_t
 - dns_rdata_t
 - qpcnode_t
 - qpznode_t
This commit is contained in:
alessio
2024-11-05 09:36:24 +01:00
parent b72a2300b9
commit 32c7060bd2
11 changed files with 39 additions and 37 deletions

View File

@@ -169,9 +169,10 @@ struct qpcnode {
unsigned int nsec : 2; /*%< range is 0..3 */
uint8_t : 0;
uint16_t locknum;
isc_refcount_t references;
isc_refcount_t erefs;
uint16_t locknum;
void *data;
/*%