]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Avoid allocating memory in LB policies for small number of servers
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 10 Jun 2022 07:50:36 +0000 (09:50 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 10 Jun 2022 07:50:36 +0000 (09:50 +0200)
commit2abf83cedf636feb29233f1a5b147f6f4a12cc08
treece19ad19e7a404e3347cba49b0efceab8eb0cc8c
parentf049f691b78f623a0c64630549d0c1fc19bcd2bb
dnsdist: Avoid allocating memory in LB policies for small number of servers

The gist of this commit is that we do not need to dynamically allocate
memory in our load-balancing policies when we have a few number of
servers to consider: we can very well use a stack-based array instead.
pdns/dnsdistdist/dnsdist-lbpolicies.cc