Files
systemd/src/basic
Lennart Poettering 6047637645 strv: when growing strv arrays piecemeal actually allocate memory in exponential steps
Let's improve memory allocation for call such as strv_extend() that just
one item to an strv: these are often called in a loop, where they used
to be very ineffecient, since we'd allocate byte-exact space. With this
change let's improve on that, by allocating exponentially by rounding up
to the next exponent of 2. This way we get GREEDY_REALLOC()-like
behaviour without passing around state.

In fact this should be good enough so that we could replace existing
loops around GREEDY_REALLOC() for strv build-up with plain strv_extend()
and get similar behaviour.
2019-12-09 18:36:03 +01:00
..
2019-10-30 09:33:51 +09:00
2019-03-14 13:25:51 +01:00
2019-04-29 16:47:18 +02:00
2019-08-20 12:01:23 +02:00
2019-10-31 17:57:03 +09:00
2019-05-21 10:57:23 +02:00
2019-11-07 10:17:44 +00:00
2019-11-04 00:30:32 +09:00
2019-11-07 10:17:44 +00:00
2018-06-14 13:03:20 +02:00
2019-03-14 13:25:51 +01:00
2019-10-31 17:57:03 +09:00
2019-11-04 00:30:32 +09:00
2018-06-14 13:03:20 +02:00
2019-10-31 17:57:03 +09:00
2019-10-31 17:57:03 +09:00
2019-03-28 18:43:04 +01:00
2019-12-04 11:01:31 +01:00
2019-12-04 11:01:31 +01:00
2019-10-31 17:57:03 +09:00
2018-05-22 16:13:45 +02:00
2019-10-31 17:57:03 +09:00
2019-01-26 12:42:46 +01:00
2019-01-26 12:42:46 +01:00
2019-10-31 17:57:03 +09:00
2019-09-20 16:05:53 +02:00
2019-04-29 16:47:18 +02:00
2019-10-31 17:57:03 +09:00
2019-10-07 12:02:12 -07:00
2018-06-29 11:02:17 +09:00