Project

General

Profile

Actions

Bug #11200

closed

Memory leak of method entries

Added by ko1 (Koichi Sasada) almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Target version:
-
[ruby-core:69420]

Description

def recur
  Class.new{
    define_method(:foo) do
      recur
    end
  }.new.foo
end

begin
  recur
rescue SystemStackError
  retry
end

This program increase memory consumption because method entries in method frames (running method entries) are not freed when classes/modules are freed.

I will solve this issue by changing method frame data structures soon.
However, it will be very big change, it is difficult to apply 2.2 and before.
It is very rare case, so I don't think it is critical issue to fix older versions.

Actions

Also available in: Atom PDF

Like0
Like0Like0