Lines Matching defs:arena

145 For SV-heads, the first slot in each arena is reserved, and holds a
146 link to the next arena, some flags, and a note of the number of slots.
147 Snaked through each arena chain is a linked list of free items; when
148 this becomes empty, an extra arena is allocated and divided up into N
151 SV-bodies are similar, but they use arena-sets by default, which
152 separate the link and info from the arena itself, and reclaim the 1st
153 slot in the arena. SV-bodies are further described later.
164 A few special SV heads are not allocated from an arena, but are
169 The SV arena serves the secondary purpose of allowing still-live SVs
175 more_sv() / sv_add_arena() to add an extra arena if the free list is empty.
270 /* make some more SVs by adding another arena */
313 "Attempt to free non-arena SV: 0x%" UVxf
348 /* The first SV in an arena isn't an SV. */
349 SvANY(sva) = (void *) PL_sv_arenaroot; /* ptr to next arena */
652 ARENASETS: a meta-arena implementation which separates arena-info
654 arena_descs, each holding info for a single arena. By separating
655 the meta-info from the arena, we recover the 1st slot, formerly
657 arena, avoiding the needless malloc overhead of a naive linked-list.
659 The cost is 1 arena-set malloc per ~320 arena-mallocs, + the unused
660 memory in the last arena-set (1/2 on average). In trade, we get
661 back the 1st slot in each arena (ie 1.7% of a CV-arena, less for
667 char *arena; /* the raw storage, allocated aligned */
669 svtype utype; /* bodytype stored in arena */
684 unsigned int curr; /* index of next available arena-desc */
723 assert(aroot->set[i].arena);
724 Safefree(aroot->set[i].arena);
754 arena-root pointers, which is indexed by svtype. Some of the
757 bodies; the data fits into the sv-head itself. The arena-root
759 later for arena type 4)
770 more complicated, it uses arena-sets, and has no need for still-live
815 Perl_more_bodies allocates a new arena, and carves it up into an array of N
816 bodies, which it strings into a linked list. It looks up arena-size
831 each arena. Offset carries the body-pointer adjustment needed for
884 /* may need new arena-set to hold new arena */
895 /* ok, now have arena-set with at least 1 empty/available arena-desc */
898 assert(!adesc->arena);
900 Newx(adesc->arena, good_arena_size, char);
903 DEBUG_m(PerlIO_printf(Perl_debug_log, "arena %d added: %p size %" UVuf "\n",
904 curr, (void*)adesc->arena, (UV)good_arena_size));
906 start = (char *) adesc->arena;
915 "arena %p end %p arena-size %d (from %d) type %d "
922 "arena %p end %p arena-size %d type %d size %d ct %d\n",
1059 /* Because the XPVMG of PL_mess_sv isn't allocated from the arena,
1103 assert(new_type_details->arena);
1111 we fake things so that arena is false for all 16 types.. */
1198 we fake things so that arena is false for all 16 types.. */
1200 if(new_type_details->arena) {
1274 assert(old_type_details->arena);
1307 assert(old_type_details->arena);
6715 * free bodies wasn't reached for these types, because the arena
6726 * "SVt_IV" arena, and the code to allocate HEs from the "SVt_NULL"
6727 * arena is entirely in hv.c, so doesn't access the table.
7022 if (sv_type_details->arena) {
10922 /* need to keep SvANY(sv) in the right arena */
14423 struct ptr_tbl_arena *arena;
14431 arena = tbl->tbl_arena;
14433 while (arena) {
14434 struct ptr_tbl_arena *next = arena->next;
14436 Safefree(arena);
14437 arena = next;
14739 if (sv_type_details->arena) {