author | Sebastian Harl <sh@tokkee.org> | |
Wed, 17 Sep 2014 09:10:13 +0000 (11:10 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 17 Sep 2014 09:10:13 +0000 (11:10 +0200) | ||
commit | 3cd97771183ee38e5fc8c3b2268cffce3c2cb27c | |
tree | 8586abafb7a79e55a9aed5d73196184f1c632b11 | tree | snapshot |
parent | ba12a0c8bc23d1be74cd85b441c800d4d29ab9fa | commit | diff |
utils strbuf: Added 'min_size' to be considered when shrinking the buffer.
It's set to the initial size of the buffer (or 64). The idea is that the
initial size should provide an estimate of a reasonable size and shrinking the
buffer below that size causes unecessary churn.
For example, this is important for the frontend's command handlers which
usually need a large buffer size but initial writes to the buffer may be
small.
It's set to the initial size of the buffer (or 64). The idea is that the
initial size should provide an estimate of a reasonable size and shrinking the
buffer below that size causes unecessary churn.
For example, this is important for the frontend's command handlers which
usually need a large buffer size but initial writes to the buffer may be
small.
src/utils/strbuf.c | diff | blob | history | |
t/unit/utils/strbuf_test.c | diff | blob | history |