Currently this struct only has the opslab_size field on debugging
builds. Change it so that this field is always present. This will make
it easier to not need a fake partial OPSLOT at the end of the slab with
a NULL opslot_next field, which will in turn simplify converting
opslot_next into U16 size field shortly.
perror("mmap failed");
abort();
}
- slab->opslab_size = (U16)sz;
#else
slab = (OPSLAB *)PerlMemShared_calloc(sz, sizeof(I32 *));
#endif
+ slab->opslab_size = (U16)sz;
+
#ifndef WIN32
/* The context is unused in non-Windows */
PERL_UNUSED_CONTEXT;
OPSLAB * opslab_head; /* first slab in chain */
OP * opslab_freed; /* chain of freed ops */
size_t opslab_refcnt; /* number of ops (head slab only) */
+ U16 opslab_size; /* size of slab in pointers,
+ including header */
# ifdef PERL_DEBUG_READONLY_OPS
- U16 opslab_size; /* size of slab in pointers */
bool opslab_readonly;
# endif
OPSLOT opslab_slots; /* slots begin here */