Skip to content

Commit 17039c5

Browse files
committed
Don't include klass in RZombie
klass is not used, so we can shrink RZombie down to 32 bytes.
1 parent aa173bc commit 17039c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gc/default/default.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ total_final_slots_count(rb_objspace_t *objspace)
993993
#endif
994994

995995
struct RZombie {
996-
struct RBasic basic;
996+
VALUE flags;
997997
VALUE next;
998998
void (*dfree)(void *);
999999
void *data;
@@ -2586,7 +2586,7 @@ rb_gc_impl_make_zombie(void *objspace_ptr, VALUE obj, void (*dfree)(void *), voi
25862586
rb_objspace_t *objspace = objspace_ptr;
25872587

25882588
struct RZombie *zombie = RZOMBIE(obj);
2589-
zombie->basic.flags = T_ZOMBIE | (zombie->basic.flags & ZOMBIE_OBJ_KEPT_FLAGS);
2589+
zombie->flags = T_ZOMBIE | (zombie->flags & ZOMBIE_OBJ_KEPT_FLAGS);
25902590
zombie->dfree = dfree;
25912591
zombie->data = data;
25922592
VALUE prev, next = heap_pages_deferred_final;

0 commit comments

Comments
 (0)