From: Jim Cromie Date: Tue, 31 Jan 2006 03:33:46 +0000 (-0700) Subject: [patch] arena rework - unify arenaroots X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fdda85ca1d39354422e21aedc492a3fed25d42b9;p=p5sagit%2Fp5-mst-13.2.git [patch] arena rework - unify arenaroots Message-ID: <43DF3D0A.3040102@gmail.com> Date: Tue, 31 Jan 2006 03:33:46 -0700 p4raw-id: //depot/perl@27030 --- diff --git a/embedvar.h b/embedvar.h index 3796bc6..f699cc2 100644 --- a/embedvar.h +++ b/embedvar.h @@ -191,7 +191,7 @@ #define PL_beginav (vTHX->Ibeginav) #define PL_beginav_save (vTHX->Ibeginav_save) #define PL_bitcount (vTHX->Ibitcount) -#define PL_body_arenaroots (vTHX->Ibody_arenaroots) +#define PL_body_arenas (vTHX->Ibody_arenas) #define PL_body_roots (vTHX->Ibody_roots) #define PL_bufend (vTHX->Ibufend) #define PL_bufptr (vTHX->Ibufptr) @@ -473,7 +473,7 @@ #define PL_Ibeginav PL_beginav #define PL_Ibeginav_save PL_beginav_save #define PL_Ibitcount PL_bitcount -#define PL_Ibody_arenaroots PL_body_arenaroots +#define PL_Ibody_arenas PL_body_arenas #define PL_Ibody_roots PL_body_roots #define PL_Ibufend PL_bufend #define PL_Ibufptr PL_bufptr diff --git a/hv.c b/hv.c index fe43f50..1ede825 100644 --- a/hv.c +++ b/hv.c @@ -43,8 +43,8 @@ S_more_he(pTHX) HE* he; HE* heend; Newx(he, PERL_ARENA_SIZE/sizeof(HE), HE); - HeNEXT(he) = (HE*) PL_body_arenaroots[HE_SVSLOT]; - PL_body_arenaroots[HE_SVSLOT] = he; + HeNEXT(he) = (HE*) PL_body_arenas; + PL_body_arenas = he; heend = &he[PERL_ARENA_SIZE / sizeof(HE) - 1]; PL_body_roots[HE_SVSLOT] = ++he; diff --git a/intrpvar.h b/intrpvar.h index 3d3db7a..575a5ba 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -414,7 +414,7 @@ PERLVAR(Iptr_table, PTR_TBL_t*) #endif PERLVARI(Ibeginav_save, AV*, NULL) /* save BEGIN{}s when compiling */ -PERLVARA(Ibody_arenaroots, SVt_LAST, void*) /* consolidated body-arena pointers */ +PERLVAR(Ibody_arenas, void*) /* pointer to list of body-arenas */ /* 5.6.0 stopped here */ diff --git a/perlapi.h b/perlapi.h index 4fa2828..8c13d01 100644 --- a/perlapi.h +++ b/perlapi.h @@ -180,8 +180,8 @@ END_EXTERN_C #define PL_beginav_save (*Perl_Ibeginav_save_ptr(aTHX)) #undef PL_bitcount #define PL_bitcount (*Perl_Ibitcount_ptr(aTHX)) -#undef PL_body_arenaroots -#define PL_body_arenaroots (*Perl_Ibody_arenaroots_ptr(aTHX)) +#undef PL_body_arenas +#define PL_body_arenas (*Perl_Ibody_arenas_ptr(aTHX)) #undef PL_body_roots #define PL_body_roots (*Perl_Ibody_roots_ptr(aTHX)) #undef PL_bufend diff --git a/sv.c b/sv.c index 029de83..e2304e6 100644 --- a/sv.c +++ b/sv.c @@ -573,13 +573,6 @@ heads and bodies within the arenas must already have been freed. =cut */ -#define free_arena(name) \ - STMT_START { \ - S_free_arena(aTHX_ (void**) PL_ ## name ## _arenaroot); \ - PL_ ## name ## _arenaroot = 0; \ - PL_ ## name ## _root = 0; \ - } STMT_END - void Perl_sv_free_arenas(pTHX) { @@ -600,11 +593,10 @@ Perl_sv_free_arenas(pTHX) Safefree(sva); } - for (i=0; iflags = flags; param->proto_perl = proto_perl; - Zero(&PL_body_arenaroots, 1, PL_body_arenaroots); + PL_body_arenas = NULL; Zero(&PL_body_roots, 1, PL_body_roots); PL_nice_chunk = NULL;