Skip to content

Commit f7985af

Browse files
committed
Remove rb_gc_heap_sizes
1 parent 94ebfc7 commit f7985af

6 files changed

Lines changed: 0 additions & 36 deletions

File tree

gc.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,6 @@ ruby_modular_gc_init(void)
871871
# define rb_gc_impl_ractor_cache_alloc rb_gc_functions.ractor_cache_alloc
872872
# define rb_gc_impl_set_params rb_gc_functions.set_params
873873
# define rb_gc_impl_init rb_gc_functions.init
874-
# define rb_gc_impl_heap_sizes rb_gc_functions.heap_sizes
875874
// Shutdown
876875
# define rb_gc_impl_shutdown_free_objects rb_gc_functions.shutdown_free_objects
877876
# define rb_gc_impl_objspace_free rb_gc_functions.objspace_free
@@ -4716,12 +4715,6 @@ rb_gc_initial_stress_set(VALUE flag)
47164715
initial_stress = flag;
47174716
}
47184717

4719-
size_t *
4720-
rb_gc_heap_sizes(void)
4721-
{
4722-
return rb_gc_impl_heap_sizes(rb_gc_get_objspace());
4723-
}
4724-
47254718
VALUE
47264719
rb_gc_enable(void)
47274720
{

gc/default/default.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2611,21 +2611,6 @@ rb_gc_impl_heap_id_for_size(void *objspace_ptr, size_t size)
26112611
return heap_idx_for_size(size);
26122612
}
26132613

2614-
2615-
static size_t heap_sizes[HEAP_COUNT + 1] = { 0 };
2616-
2617-
size_t *
2618-
rb_gc_impl_heap_sizes(void *objspace_ptr)
2619-
{
2620-
if (heap_sizes[0] == 0) {
2621-
for (unsigned char i = 0; i < HEAP_COUNT; i++) {
2622-
heap_sizes[i] = heap_slot_size(i);
2623-
}
2624-
}
2625-
2626-
return heap_sizes;
2627-
}
2628-
26292614
NOINLINE(static VALUE newobj_cache_miss(rb_objspace_t *objspace, rb_ractor_newobj_cache_t *cache, size_t heap_idx, bool vm_locked));
26302615

26312616
static VALUE

gc/gc_impl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ GC_IMPL_FN void rb_gc_impl_objspace_init(void *objspace_ptr);
3838
GC_IMPL_FN void *rb_gc_impl_ractor_cache_alloc(void *objspace_ptr, void *ractor);
3939
GC_IMPL_FN void rb_gc_impl_set_params(void *objspace_ptr);
4040
GC_IMPL_FN void rb_gc_impl_init(void);
41-
GC_IMPL_FN size_t *rb_gc_impl_heap_sizes(void *objspace_ptr);
4241
// Shutdown
4342
GC_IMPL_FN void rb_gc_impl_shutdown_free_objects(void *objspace_ptr);
4443
GC_IMPL_FN void rb_gc_impl_objspace_free(void *objspace_ptr);

gc/mmtk/mmtk.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -687,12 +687,6 @@ rb_gc_impl_init(void)
687687
rb_define_singleton_method(rb_mGC, "verify_compaction_references", rb_f_notimplement, -1);
688688
}
689689

690-
size_t *
691-
rb_gc_impl_heap_sizes(void *objspace_ptr)
692-
{
693-
return heap_sizes;
694-
}
695-
696690
int
697691
rb_mmtk_obj_free_iter_wrapper(VALUE obj, void *data)
698692
{

gc/wbcheck/wbcheck.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -536,12 +536,6 @@ rb_gc_impl_init(void)
536536
// Stub implementation
537537
}
538538

539-
size_t *
540-
rb_gc_impl_heap_sizes(void *objspace_ptr)
541-
{
542-
return heap_sizes;
543-
}
544-
545539
// Shutdown
546540
void
547541
rb_gc_impl_shutdown_free_objects(void *objspace_ptr)

internal/gc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ void *rb_gc_ractor_cache_alloc(rb_ractor_t *ractor);
205205
void rb_gc_ractor_cache_free(void *cache);
206206

207207
bool rb_gc_size_allocatable_p(size_t size);
208-
size_t *rb_gc_heap_sizes(void);
209208
size_t rb_gc_heap_id_for_size(size_t size);
210209

211210
void rb_gc_mark_and_move(VALUE *ptr);

0 commit comments

Comments
 (0)