mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 02:46:16 +01:00
GString: Bump minimum size
GString starts out at a size of 2, which is just not useful. Bump the minimum size to 64 to cut down on the number of tiny reallocations we do.
This commit is contained in:
parent
861afbe639
commit
7fc7c57b6f
@ -123,7 +123,7 @@ g_string_sized_new (gsize dfl_size)
|
||||
string->len = 0;
|
||||
string->str = NULL;
|
||||
|
||||
g_string_maybe_expand (string, MAX (dfl_size, 2));
|
||||
g_string_maybe_expand (string, MAX (dfl_size, 64));
|
||||
string->str[0] = 0;
|
||||
|
||||
return string;
|
||||
|
Loading…
Reference in New Issue
Block a user