summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2024-02-11 21:43:38 -0800
committerJohn Hawthorn <john@hawthorn.email>2024-02-20 18:55:00 -0800
commit1c97abaabae6844c861705fd07f532292dcffa74 (patch)
treea1d5dbac7eab32f6ffc168f1e556dfac085bc89a /test/ruby
parent2a6917b463fa4065f26aea44802e2e24cc494e4c (diff)
De-dup identical callinfo objects
Previously every call to vm_ci_new (when the CI was not packable) would result in a different callinfo being returned this meant that every kwarg callsite had its own CI. When calling, different CIs result in different CCs. These CIs and CCs both end up persisted on the T_CLASS inside cc_tbl. So in an eval loop this resulted in a memory leak of both types of object. This also likely resulted in extra memory used, and extra time searching, in non-eval cases. For simplicity in this commit I always allocate a CI object inside rb_vm_ci_lookup, but ideally we would lazily allocate it only when needed. I hope to do that as a follow up in the future.
Diffstat (limited to 'test/ruby')
0 files changed, 0 insertions, 0 deletions