sv.c
/*
=for apidoc sv_free_arenas

Deallocate the memory used by all arenas.  Note that all the individual SV
heads and bodies within the arenas must already have been freed.

=cut
*/
for apidoc sv_free_arenas
Deallocate the memory used by all arenas.  Note that all the individual SV
heads and bodies within the arenas must already have been freed.

cut
for apidoc sv_free_arenas Deallocate the memory used by all arenas . Note that all the individual SV heads and bodies within the arenas must already have been freed . cut
void
Perl_sv_free_arenas(pTHX)
{
    dVAR;
    SV* sva;
    SV* svanext;
    unsigned int i;
    for (sva = PL_sv_arenaroot; sva; sva = svanext) {
	svanext = MUTABLE_SV(SvANY(sva));
	while (svanext && SvFAKE(svanext))
	    svanext = MUTABLE_SV(SvANY(svanext));
	if (!SvFAKE(sva))
	    Safefree(sva);
    }
    {
	struct arena_set *aroot = (struct arena_set*) PL_body_arenas;
	while (aroot) {
	    struct arena_set *current = aroot;
	    i = aroot->curr;
	    while (i--) {
		assert(aroot->set[i].arena);
		Safefree(aroot->set[i].arena);
	    }
	    aroot = aroot->next;
	    Safefree(current);
	}
    }
    PL_body_arenas = 0;
    i = PERL_ARENA_ROOTS_SIZE;
    while (i--)
	PL_body_roots[i] = 0;
    PL_sv_arenaroot = 0;
    PL_sv_root = 0;
}
void Perl_sv_free_arenas ( pTHX ) { dVAR ; SV * sva ; SV * svanext ; unsigned int i ; for ( sva = PL_sv_arenaroot ; sva ; sva = svanext ) { svanext = MUTABLE_SV ( SvANY ( sva ) ) ; while ( svanext && SvFAKE ( svanext ) ) svanext = MUTABLE_SV ( SvANY ( svanext ) ) ; if ( ! SvFAKE ( sva ) ) Safefree ( sva ) ; } { struct arena_set * aroot = ( struct arena_set * ) PL_body_arenas ; while ( aroot ) { struct arena_set * current = aroot ; i = aroot -> curr ; while ( i -- ) { assert ( aroot -> set [ i ] . arena ) ; Safefree ( aroot -> set [ i ] . arena ) ; } aroot = aroot -> next ; Safefree ( current ) ; } } PL_body_arenas = 0 ; i = PERL_ARENA_ROOTS_SIZE ; while ( i -- ) PL_body_roots [ i ] = 0 ; PL_sv_arenaroot = 0 ; PL_sv_root = 0 ; }
for apidoc sv_free_arenas
Deallocate the memory used by all arenas.
for apidoc sv_free_arenas Deallocate the memory used by all arenas .
/* Free arenas here, but be careful about fake ones.  (We assume
       contiguity of the fake ones with the corresponding real ones.) */