Issue #13982 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 2.3: DONTNEED, 2.4: REQUIRED to 2.3: DONTNEED, 2.4: DONE

ruby_2_4 r62172 merged revision(s) 60042,60130,60131.

----------------------------------------
Bug #13982: Memory leak in Zlib.gunzip
https://bugs.ruby-lang.org/issues/13982#change-70139

* Author: rhenium (Kazuki Yamaguchi)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.0dev (2017-10-06 master 60128) [x86_64-linux]
* Backport: 2.3: DONTNEED, 2.4: DONE
----------------------------------------
Zlib.gunzip which was added in Ruby 2.4 seems to leak memory every time it is called.

```
$ ruby -rzlib -e'END{puts File.readlines("/proc/self/status").grep(/RSS/)}' -e'd=Zlib.gzip("data"); 100_000.times{Zlib.gunzip(d)}'
VmRSS:	  829496 kB
```



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>