diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2004-06-07 23:09:42 +0300 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-06-08 13:44:27 +0000 |
commit | 2b573acec7886e18e5f2804e8915073100dce2e4 (patch) | |
tree | 60c48c757c95672d726a096029840f65f872f61b /av.c | |
parent | 7b614c55f5b832a2a6bef87f61ab8323c0d06c60 (diff) | |
download | perl-2b573acec7886e18e5f2804e8915073100dce2e4.tar.gz |
Re: [PATCH] Re: Lack of error for large string on Solaris
Message-ID: <40C4A156.5030205@iki.fi>
p4raw-id: //depot/perl@22904
Diffstat (limited to 'av.c')
-rw-r--r-- | av.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -100,6 +100,11 @@ Perl_av_extend(pTHX_ AV *av, I32 key) } } else { +#ifdef PERL_MALLOC_WRAP + static const char oom_array_extend[] = + "Out of memory during array extend"; /* Duplicated in pp_hot.c */ +#endif + if (AvALLOC(av)) { #if !defined(STRANGE_MALLOC) && !defined(MYMALLOC) MEM_SIZE bytes; @@ -114,7 +119,7 @@ Perl_av_extend(pTHX_ AV *av, I32 key) #endif newmax = key + AvMAX(av) / 5; resize: - MEM_WRAP_CHECK_1(newmax+1, SV*, "panic: array extend"); + MEM_WRAP_CHECK_1(newmax+1, SV*, oom_array_extend); #if defined(STRANGE_MALLOC) || defined(MYMALLOC) Renew(AvALLOC(av),newmax+1, SV*); #else @@ -149,7 +154,7 @@ Perl_av_extend(pTHX_ AV *av, I32 key) } else { newmax = key < 3 ? 3 : key; - MEM_WRAP_CHECK_1(newmax+1, SV*, "panic: array extend"); + MEM_WRAP_CHECK_1(newmax+1, SV*, oom_array_extend); New(2,AvALLOC(av), newmax+1, SV*); ary = AvALLOC(av) + 1; tmp = newmax; |