This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add patch preextend global string table, tweak for 512 entries
[perl5.git] / perl.c
diff --git a/perl.c b/perl.c
index 14357b7..e2db42c 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -1859,8 +1859,7 @@ init_main_stash(void)
        It is properly deallocated in perl_destruct() */
     strtab = newHV();
     HvSHAREKEYS_off(strtab);                   /* mandatory */
-    Newz(506,((XPVHV*)SvANY(strtab))->xhv_array,
-        sizeof(HE*) * (((XPVHV*)SvANY(strtab))->xhv_max + 1), char);
+    hv_ksplit(strtab, 512);
     
     curstash = defstash = newHV();
     curstname = newSVpv("main",4);