From 8f8d6e5db21716b27db05a61368bfe5dfec10c68 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 11 Oct 2021 13:11:24 -0500 Subject: [PATCH] refactor: remove padding holes from Bandwidth (#1926) Another pahole patch. No functional changes; just rearranging fields. old sizeof(Bandwidth): 848 new sizeof(Bandwidth): 816 --- libtransmission/bandwidth.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libtransmission/bandwidth.h b/libtransmission/bandwidth.h index 0f6ccdc34..e9fe3de03 100644 --- a/libtransmission/bandwidth.h +++ b/libtransmission/bandwidth.h @@ -204,7 +204,6 @@ public: struct RateControl { - int newest_; struct Transfer { uint64_t date_; @@ -213,16 +212,17 @@ public: std::array transfers_; uint64_t cache_time_; unsigned int cache_val_; + int newest_; }; struct Band { - bool is_limited_; - bool honor_parent_limits_; - unsigned int bytes_left_; - unsigned int desired_speed_bps_; RateControl raw_; RateControl piece_; + unsigned int bytes_left_; + unsigned int desired_speed_bps_; + bool is_limited_; + bool honor_parent_limits_; }; private: @@ -240,11 +240,11 @@ private: unsigned int period_msec, std::vector& peer_pool); - tr_priority_t priority = 0; std::array band_; Bandwidth* parent_; std::unordered_set children_; tr_peerIo* peer_; + tr_priority_t priority = 0; }; /* @} */