resolved: grow DnsAnswer exponentially
authorLennart Poettering <lennart@poettering.net>
Wed, 9 Dec 2015 17:05:53 +0000 (18:05 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 10 Dec 2015 10:35:52 +0000 (11:35 +0100)
commit2f763887b8696f2fd2d577bfbd011f3b2e889c1a
tree77ec716f37c6ba5132445e397cf4697d5908ca41
parent48d5616b9258cc5d1af1d4b934cea7970aa55a28
resolved: grow DnsAnswer exponentially

When increasing the DnsAnswer array, don't operate piecemeal, grow the
array exponentially.

This way, the default logic for DnsAnswer allocations matches the
behaviour for GREEDY_REALLOC and suchlike, and we can reduce the number
of necessary allocations.
src/resolve/resolved-dns-answer.c