Skip to content

Commit 58e7582

Browse files
committed
Skip malloc recording on non-main ractors
1 parent 307f5a0 commit 58e7582

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

gc/default/default.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8040,6 +8040,11 @@ objspace_malloc_increase_report(rb_objspace_t *objspace, void *mem, size_t new_s
80408040
static bool
80418041
objspace_malloc_increase_body(rb_objspace_t *objspace, void *mem, size_t new_size, size_t old_size, enum memop_type type, bool gc_allowed)
80428042
{
8043+
if (!rb_ractor_main_p()) {
8044+
/* HACK: ignore mallocs on other Ractors */
8045+
return true;
8046+
}
8047+
80438048
if (new_size > old_size) {
80448049
RUBY_ATOMIC_SIZE_ADD(malloc_increase, new_size - old_size);
80458050
#if RGENGC_ESTIMATE_OLDMALLOC

0 commit comments

Comments
 (0)