]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Pad struct hole with rarely used fields
authorAlessio Podda <alessio@isc.org>
Mon, 3 Aug 2026 15:07:54 +0000 (17:07 +0200)
committerAlessio Podda <alessio@isc.org>
Thu, 13 Aug 2026 17:06:27 +0000 (19:06 +0200)
The alignment we added to the zone reference and the zone lock
increases the size of dns_zone_t. Compensate for it by moving
some cold fields in the hole left by alignment.

lib/dns/zone_p.h

index bf0a8c0255a294e2bf1fd3d56f818f938794cd7b..90768fcdc4350383adf3400c24450a7d2417c9ab 100644 (file)
@@ -370,6 +370,10 @@ struct dns_zone {
        isc_mem_t *mctx;
        __attribute__((
                aligned(ISC_OS_CACHELINE_SIZE))) isc_refcount_t references;
+       char *masterfile;
+       char *initfile;
+       const FILE *stream;               /* loading from a stream? */
+       ISC_LIST(dns_include_t) includes; /* Include files */
 
        __attribute__((aligned(ISC_OS_CACHELINE_SIZE))) isc_rwlock_t dblock;
        dns_db_t *db; /* Locked by dblock */
@@ -383,10 +387,6 @@ struct dns_zone {
        isc_refcount_t irefs;
        dns_name_t origin;
        dns_rad_t *rad;
-       char *masterfile;
-       char *initfile;
-       const FILE *stream;                  /* loading from a stream? */
-       ISC_LIST(dns_include_t) includes;    /* Include files */
        ISC_LIST(dns_include_t) newincludes; /* Loading */
        unsigned int nincludes;
        dns_masterformat_t masterformat;