]> git.ipfire.org Git - thirdparty/knot-resolver.git/commit
lib/generic/array: improve the growth strategy hints-huge-tmp
authorVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 9 Mar 2020 14:39:15 +0000 (15:39 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 9 Mar 2020 15:14:59 +0000 (16:14 +0100)
commitdb7024393c864c36e2885d3c81bb4f9eda0f11e9
treedbea604dab7b91520742d5fad6f40aae70fe9e2c
parentf48d568220a66b62b645c9409992eaa16174bed8
lib/generic/array: improve the growth strategy

For large arrays it was linear, so huge amount of +1 would need
quadratic time together.  I've been hating that for a long time,
but now I finally have a use case where it makes a large difference.
The one from GCC looks good to me (theoretically) and it surely has
lots of practical deployment.

CI scan-build: I still have no idea about these array allocation
errors; I had just given up and believe they're false alarms.
.gitlab-ci.yml
lib/generic/array.h
lib/utils.c