From: Vladimír Čunát Date: Wed, 6 Aug 2025 14:09:25 +0000 (+0200) Subject: lib/kru nit: shrink the USE_AES version of struct kru by 64 bytes X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fe7d95e119cf652a12aec5d1c471f12dfcea9c40;p=thirdparty%2Fknot-resolver.git lib/kru nit: shrink the USE_AES version of struct kru by 64 bytes Just by dropping some padding in the header. Also drop a long outdated part of comment on this. --- diff --git a/lib/kru.inc.c b/lib/kru.inc.c index d5d2baac0..b556f1680 100644 --- a/lib/kru.inc.c +++ b/lib/kru.inc.c @@ -83,7 +83,8 @@ struct load_cl { static_assert(64 == sizeof(struct load_cl), "bad size of struct load_cl"); /// Parametrization for speed of decay. -struct decay_config { +// Packed to allow unpadded following by more data in the USE_AES version of struct kru. +struct __attribute__((packed)) decay_config { /// Bit shift per tick, fractional double shift_bits; @@ -96,7 +97,7 @@ struct decay_config { struct kru { #if USE_AES /// Hashing secret. Random but shared by all users of the table. - /// Let's not make it too large, so that header fits into 64 Bytes. + /// Let's not make it too large. _Alignas(32) char hash_key[48]; #else /// Hashing secret. Random but shared by all users of the table.