From 62bc4a9420fa5786d49391a713bd38b09b8db0ff Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 24 Aug 2021 13:14:23 -0400 Subject: [Feature #18045] Implement size classes for GC This commits implements size classes in the GC for the Variable Width Allocation feature. Unless `USE_RVARGC` compile flag is set, only a single size class is created, maintaining current behaviour. See the redmine ticket for more details. Co-authored-by: Aaron Patterson --- internal/gc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/gc.h') diff --git a/internal/gc.h b/internal/gc.h index 7d1efebfca..548ae5568a 100644 --- a/internal/gc.h +++ b/internal/gc.h @@ -101,6 +101,7 @@ static inline void *ruby_sized_xrealloc2_inlined(void *ptr, size_t new_count, si static inline void ruby_sized_xfree_inlined(void *ptr, size_t size); VALUE rb_class_allocate_instance(VALUE klass); void rb_gc_ractor_newobj_cache_clear(rb_ractor_newobj_cache_t *newobj_cache); +void *rb_gc_rvargc_object_data(VALUE obj); RUBY_SYMBOL_EXPORT_BEGIN /* gc.c (export) */ @@ -116,7 +117,6 @@ void rb_gc_mark_vm_stack_values(long n, const VALUE *values); void *ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2)); void *ruby_sized_xrealloc2(void *ptr, size_t new_count, size_t element_size, size_t old_count) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2, 3)); void ruby_sized_xfree(void *x, size_t size); -int rb_slot_size(void); RUBY_SYMBOL_EXPORT_END MJIT_SYMBOL_EXPORT_BEGIN -- cgit v1.2.3