summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2019-07-13 20:27:45 +0100
committerDavid Mitchell <davem@iabyn.com>2019-08-05 11:30:51 +0100
commit7b85c12a47eeaeb8aaaa0c95fdbdd48ecd5f929d (patch)
tree4171f9e2d06e5322bcb6a09f9784417835e7c0ba /op.h
parentaa034fa00bac53c08ef0dd886ebf864da25d155a (diff)
downloadperl-7b85c12a47eeaeb8aaaa0c95fdbdd48ecd5f929d.tar.gz
opslabs: change opslab_first to opslab_free_space
Currently a OPSLAB maintains a pointer to the lowest allocated OPSLOT within the slab (slots are allocated downwards). Replace this pointer with a U16 indicating how many pointer-sized words are free below the lowest allocated slot.
Diffstat (limited to 'op.h')
-rw-r--r--op.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/op.h b/op.h
index e97683efae..5a61b6a331 100644
--- a/op.h
+++ b/op.h
@@ -696,13 +696,15 @@ struct opslot {
};
struct opslab {
- OPSLOT * opslab_first; /* first op in this slab */
OPSLAB * opslab_next; /* next slab */
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 */
+ U16 opslab_free_space; /* space available in this slab
+ for allocating new ops (in ptr
+ units) */
# ifdef PERL_DEBUG_READONLY_OPS
bool opslab_readonly;
# endif