Skip to content

Commit 32b97f5

Browse files
committed
Sync with ruby/ruby
1 parent 65d5d2e commit 32b97f5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gc/mmtk/mmtk.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "ruby/assert.h"
55
#include "ruby/atomic.h"
66
#include "ruby/debug.h"
7+
#include "internal/object.h"
78

89
#include "gc/gc.h"
910
#include "gc/gc_impl.h"
@@ -453,6 +454,7 @@ rb_gc_impl_init(void)
453454
{
454455
VALUE gc_constants = rb_hash_new();
455456
rb_hash_aset(gc_constants, ID2SYM(rb_intern("BASE_SLOT_SIZE")), SIZET2NUM(sizeof(VALUE) * 5));
457+
rb_hash_aset(gc_constants, ID2SYM(rb_intern("RBASIC_SIZE")), SIZET2NUM(sizeof(struct RBasic)));
456458
rb_hash_aset(gc_constants, ID2SYM(rb_intern("RVALUE_OVERHEAD")), INT2NUM(0));
457459
rb_hash_aset(gc_constants, ID2SYM(rb_intern("RVARGC_MAX_ALLOCATE_SIZE")), LONG2FIX(640));
458460
// Pretend we have 5 size pools
@@ -1019,7 +1021,7 @@ rb_gc_impl_shutdown_call_finalizer(void *objspace_ptr)
10191021

10201022
if (rb_gc_shutdown_call_finalizer_p(obj)) {
10211023
rb_gc_obj_free(objspace_ptr, obj);
1022-
RBASIC(obj)->flags = 0;
1024+
RBASIC_RESET_FLAGS(obj);
10231025
}
10241026
}
10251027
mmtk_free_raw_vec_of_obj_ref(registered_candidates);

0 commit comments

Comments
 (0)