]> git.ipfire.org Git - thirdparty/systemd.git/commit
string-util: use GREEDY_ALLOC_ROUND_UP() in strextend() 18150/head
authorLennart Poettering <lennart@poettering.net>
Wed, 6 Jan 2021 16:23:38 +0000 (17:23 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 6 Jan 2021 16:25:12 +0000 (17:25 +0100)
commit2a4e1fd0d498824f31292d8ba4e1e97c05eef0b8
treecd18c3d6fadbb0d347bba91b41285a7f12eeb299
parentc2bc710b247db83d7964f2259144c0c70defe2da
string-util: use GREEDY_ALLOC_ROUND_UP() in strextend()

This uses GREEDY_ALLOC_ROUND_UP() to grow the allocation size
exponentially. This should speed allocation loops up a bit, given
that we often call strextend() repeatedly in a loop on the same
buffer.
src/basic/string-util.c