mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 13:23:09 +00:00
eac808a819
* string repeat: Don't allocate repeated string all at once This used to allocate one string and fill it with the necessary repetitions, which could be a very very large string. Now, it instead uses one buffer and fills it to a chunk size, and then writes that. This fixes: 1. We no longer crash with too large max/count values. Before they caused a bad_alloc because we tried to fill all RAM. 2. We no longer fill all RAM if given a big-but-not-too-big value. You could've caused fish to eat *most* of your RAM here. 3. It can start writing almost immediately, instead of waiting potentially minutes to start. Performance is about the same to slightly faster overall. |
||
---|---|---|
.. | ||
checks | ||
pexpects | ||
test_functions | ||
.gitignore | ||
history_sample_bash | ||
history_sample_corrupt1 | ||
history_sample_fish_1_x | ||
history_sample_fish_2_0 | ||
interactive.config | ||
interactive.fish | ||
test.fish | ||
test_driver.sh | ||
test_env.sh | ||
test_util.fish |