summaryrefslogtreecommitdiff
path: root/src/til_settings.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-08-14 01:13:02 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-08-14 02:05:43 -0700
commit210580bb0bbd14c02c2ba929012399ec32885de1 (patch)
treeb4172f1fffdb35e5782e4b976418d12f4ddebbf0 /src/til_settings.c
parentff272ab570f376224a96f83d2f185ad3796a9155 (diff)
til_str: realloc in increasingly larger increments
Typically people do a exponential style growth in such circumstances, but in my experience that tends to allocate nearly double what's needed quite often. Trying just a linearly increasing allocation size that bumps up the minimum amount every time a resize is triggered. If the needed amount exceeds the new growth increment, the larger value is used, but the growth rate still follows the minimum bump. I expect this to evolve more, just wanted to do something to speed up til_str a bit from it's naive approach.
Diffstat (limited to 'src/til_settings.c')
0 files changed, 0 insertions, 0 deletions
© All Rights Reserved