diff options
author | Peter Zhu <[email protected]> | 2024-02-27 14:50:40 -0500 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2024-03-01 10:39:51 -0500 |
commit | 162e13c884a1764e6cf6e62407e607d18f29eecc (patch) | |
tree | 9f2d43ab8bd43b432a0e61f8406808d39df44a15 /imemo.c | |
parent | f3af5ae7e6c1c096bbfe46d69de825a02b1696cf (diff) |
Remove pointer check in vm_ccs_free
We don't need to check that the object is pointer to the GC heap in
vm_ccs_free because it is called during sweeping, which does not free
pages so it can never point to an object that is not on the GC heap.
Diffstat (limited to 'imemo.c')
-rw-r--r-- | imemo.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -455,7 +455,7 @@ vm_ccs_free(struct rb_class_cc_entries *ccs, int alive, VALUE klass) if (!alive) { void *ptr = asan_unpoison_object_temporary((VALUE)cc); // ccs can be free'ed. - if (rb_gc_is_ptr_to_obj(cc) && + if (rb_objspace_markable_object_p((VALUE)cc) && IMEMO_TYPE_P(cc, imemo_callcache) && cc->klass == klass) { // OK. maybe target cc. |