"rupert (Robert Pankowecki)" <robert.pankowecki / gmail.com> wrote:
> Any progress ? Looks like this is still a problem in Ruby2.0: https://gist.github.com/bf4b57d5bf419dbf56ae
> ----------------------------------------
> Bug #5437: Using fibers leads to huge memory leak
> https://bugs.ruby-lang.org/issues/5437#change-28726

Try increasing your outer loop from 10.times to 100.times, or
1000.times, etc...  You should see memory usage stabilize with a bigger
loop.

Returning memory back to the OS is expensive (if the app is likely to
reuse it), so Ruby probably wants to hold onto some internal structures
(as does glibc malloc).