summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2004-02-11 01:15:14 +0200
committerNicholas Clark <nick@ccl4.org>2004-03-17 17:58:44 +0000
commit27d5b266d3ace9bd49a167d34f7350f3768d1326 (patch)
tree67ceee30c206b7443faf00207d8642d0c1a115a7 /av.c
parent165cc789d248f15373a01b5b620e86cdc98e3eab (diff)
downloadperl-27d5b266d3ace9bd49a167d34f7350f3768d1326.tar.gz
malloc wrappage
Message-Id: <37BF70DE-5C0E-11D8-B5A1-00039362CB92@iki.fi> plus change croak to Perl_croak_nocontext to make ithread safe plus make it conditional on PERL_MALLOC_WRAP (default for blead is on) p4raw-id: //depot/perl@22517
Diffstat (limited to 'av.c')
-rw-r--r--av.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/av.c b/av.c
index d37ba01c01..ac623cc2de 100644
--- a/av.c
+++ b/av.c
@@ -114,6 +114,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");
#if defined(STRANGE_MALLOC) || defined(MYMALLOC)
Renew(AvALLOC(av),newmax+1, SV*);
#else
@@ -148,6 +149,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");
New(2,AvALLOC(av), newmax+1, SV*);
ary = AvALLOC(av) + 1;
tmp = newmax;