remove -Dmad string length restriction
authorDavid Mitchell <davem@iabyn.com>
Sun, 9 Jun 2013 09:50:15 +0000 (10:50 +0100)
committerDavid Mitchell <davem@iabyn.com>
Sun, 9 Jun 2013 09:50:15 +0000 (10:50 +0100)
Under -Dmad, with PERL_MADSKILLS > 0, it prints a warning for every
string that is grown to be >= 1Mb. I can't see that it makes any sense to
do this, so I suspect that this is residual code from MAD development, or
an accidental copying of the almost identical #ifdef HAS_64K_LIMIT
piece of code directly following it.

sv.c

diff --git a/sv.c b/sv.c
index 962e392..8222aae 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -1474,10 +1474,6 @@ Perl_sv_grow(pTHX_ SV *const sv, STRLEN newlen)
 
     PERL_ARGS_ASSERT_SV_GROW;
 
-    if (PL_madskills && newlen >= 0x100000) {
-       PerlIO_printf(Perl_debug_log,
-                     "Allocation too large: %"UVxf"\n", (UV)newlen);
-    }
 #ifdef HAS_64K_LIMIT
     if (newlen >= 0x10000) {
        PerlIO_printf(Perl_debug_log,