This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: Not so aggressive collation memory use guess
[perl5.git] / locale.c
index 9414eb4..48b9184 100644 (file)
--- a/locale.c
+++ b/locale.c
@@ -1782,7 +1782,7 @@ Perl__mem_collxfrm(pTHX_ const char *input_string,
                 *      isn't sufficient, they return the input size instead of
                 *      how much is needed.)
                 * Increase the buffer size by a fixed percentage and try again. */
-            xAlloc = (2 * xAlloc) + 1;
+            xAlloc += (xAlloc / 4) + 1;
             PL_strxfrm_is_behaved = FALSE;
 
 #ifdef DEBUGGING