#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)
#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
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;
#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 */
#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
=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)
{
Safefree(sva);
}
- for (i=0; i<SVt_LAST; i++) {
- S_free_arena(aTHX_ (void**) PL_body_arenaroots[i]);
- PL_body_arenaroots[i] = 0;
+ S_free_arena(aTHX_ (void**) PL_body_arenas);
+
+ for (i=0; i<SVt_LAST; i++)
PL_body_roots[i] = 0;
- }
Safefree(PL_nice_chunk);
PL_nice_chunk = Nullch;
S_more_bodies (pTHX_ size_t size, svtype sv_type)
{
dVAR;
- void ** const arena_root = &PL_body_arenaroots[sv_type];
- void ** const root = &PL_body_roots[sv_type];
+ void ** const root = &PL_body_roots[sv_type];
char *start;
const char *end;
const size_t count = PERL_ARENA_SIZE / size;
Newx(start, count*size, char);
- *((void **) start) = *arena_root;
- *arena_root = (void *)start;
+ *((void **) start) = PL_body_arenas;
+ PL_body_arenas = (void *)start;
end = start + (count-1) * size;
param->flags = 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;