mirror of
https://github.com/transmission/transmission
synced 2025-03-17 17:25:32 +00:00
refactor: remove padding holes from Bandwidth (#1926)
Another pahole patch. No functional changes; just rearranging fields. old sizeof(Bandwidth): 848 new sizeof(Bandwidth): 816
This commit is contained in:
parent
39376f2105
commit
8f8d6e5db2
1 changed files with 6 additions and 6 deletions
|
@ -204,7 +204,6 @@ public:
|
||||||
|
|
||||||
struct RateControl
|
struct RateControl
|
||||||
{
|
{
|
||||||
int newest_;
|
|
||||||
struct Transfer
|
struct Transfer
|
||||||
{
|
{
|
||||||
uint64_t date_;
|
uint64_t date_;
|
||||||
|
@ -213,16 +212,17 @@ public:
|
||||||
std::array<Transfer, HISTORY_SIZE> transfers_;
|
std::array<Transfer, HISTORY_SIZE> transfers_;
|
||||||
uint64_t cache_time_;
|
uint64_t cache_time_;
|
||||||
unsigned int cache_val_;
|
unsigned int cache_val_;
|
||||||
|
int newest_;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Band
|
struct Band
|
||||||
{
|
{
|
||||||
bool is_limited_;
|
|
||||||
bool honor_parent_limits_;
|
|
||||||
unsigned int bytes_left_;
|
|
||||||
unsigned int desired_speed_bps_;
|
|
||||||
RateControl raw_;
|
RateControl raw_;
|
||||||
RateControl piece_;
|
RateControl piece_;
|
||||||
|
unsigned int bytes_left_;
|
||||||
|
unsigned int desired_speed_bps_;
|
||||||
|
bool is_limited_;
|
||||||
|
bool honor_parent_limits_;
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -240,11 +240,11 @@ private:
|
||||||
unsigned int period_msec,
|
unsigned int period_msec,
|
||||||
std::vector<tr_peerIo*>& peer_pool);
|
std::vector<tr_peerIo*>& peer_pool);
|
||||||
|
|
||||||
tr_priority_t priority = 0;
|
|
||||||
std::array<Band, 2> band_;
|
std::array<Band, 2> band_;
|
||||||
Bandwidth* parent_;
|
Bandwidth* parent_;
|
||||||
std::unordered_set<Bandwidth*> children_;
|
std::unordered_set<Bandwidth*> children_;
|
||||||
tr_peerIo* peer_;
|
tr_peerIo* peer_;
|
||||||
|
tr_priority_t priority = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* @} */
|
/* @} */
|
||||||
|
|
Loading…
Add table
Reference in a new issue