summaryrefslogtreecommitdiff
path: root/spec/ruby
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2024-07-22 11:43:22 -0400
committerPeter Zhu <peter@peterzhu.ca>2024-07-22 14:22:47 -0400
commit5299672a5bb52904cc6b9555be704af2cdc18eba (patch)
treea51dbc1eaa728c105e747385a59589b9f50096fe /spec/ruby
parent34adc07372c10170b8ca36111d216cbd8e4699be (diff)
[PRISM] Fix memory leak in constants
For example, the following code leaks: code = 1000.times.map { |i| "var#{i} = 1" }.join("\n") 10.times do 1000.times do RubyVM::InstructionSequence.compile_prism(code) end puts `ps -o rss= -p #{$$}` end Before: 70384 88032 103856 115712 125584 132768 144784 152624 165296 180608 After: 62368 78784 74512 87712 85072 77728 69424 74992 71264 81440
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11222
Diffstat (limited to 'spec/ruby')
0 files changed, 0 insertions, 0 deletions