mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 21:50:17 +01:00
Instead of growing the buffer for the tokens (and reallocating), do one pre-run over the string and count the delimiters. This way we know how much space we need and we don't need to reallocate. Interestingly, this is notably slower than the previous implementation, because previously if would not bother determining the right number of tokens but just over-allocate with a reasonable guess of 8 and grow the buffer exponentially. Still, I like this better because while it may be slower in common scenarios, it allocates the exact number of buffer space. |
||
|---|---|---|
| .. | ||
| c-list | ||
| c-rbtree | ||
| c-siphash | ||
| n-acd | ||
| nm-utils | ||
| systemd | ||
| meson.build | ||
| nm-common-macros.h | ||
| nm-dbus-compat.h | ||
| nm-default.h | ||
| nm-dispatcher-api.h | ||
| nm-ethtool-utils.c | ||
| nm-ethtool-utils.h | ||
| nm-libnm-core-utils.c | ||
| nm-libnm-core-utils.h | ||
| nm-meta-setting.c | ||
| nm-meta-setting.h | ||
| nm-test-libnm-utils.h | ||
| nm-test-utils-impl.c | ||
| nm-version-macros.h.in | ||