Skip to content

Commit

Permalink
Reserves
Browse files Browse the repository at this point in the history
  • Loading branch information
vimes committed Dec 17, 2024
1 parent 9eb04b3 commit 92d2254
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions controlplane/balancer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,7 @@ bool balancer_t::reconfigure_wlc()
}

std::vector<std::tuple<balancer::real_key_global_t, uint32_t, uint32_t>> service_reals_usage_info;
service_reals_usage_info.reserve(reals.size());
uint32_t connection_sum = 0;
uint32_t weight_sum = 0;

Expand Down
1 change: 1 addition & 0 deletions dataplane/globalbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1646,6 +1646,7 @@ balancer_real_id_t* generation::rebuild_service_ring_one_wrr(
std::vector<generation::RealWeight> generation::ServiceWeights(const balancer_service_t& service)
{
std::vector<RealWeight> weights;
weights.reserve(service.real_size);
for (uint32_t real_idx = service.real_start;
real_idx < service.real_start + service.real_size;
++real_idx)
Expand Down

0 comments on commit 92d2254

Please sign in to comment.