Actions
Bug #15422
closedRe: [ruby-cvs:73514] normal:r66413 (trunk): thread_pthread.c: fix memory leak from fork loop leapfrog (v3)
Description
https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66413
Finally fixed for GNU/Linux. Not on FreeBSD 11.2,
but it was also present in 2.4.5:
==> fork_leapfrog_freebsd.rb <==
require 'io/wait'
prev = 0
100000.times do
pid = fork
exit!(0) if pid
show the RSS (FreeBSD 11.x)¶
n = IO.popen("ps -u #$$", &:readlines)[1].split[5].to_i
if n > prev
puts "#{prev} => #{n}"
prev = n
end
since Ctrl-C from a terminal can't stop this loop,¶
allow the user to just mash the keyboard to stop¶
break if STDIN.wait(0)
end
Updated by jeremyevans0 (Jeremy Evans) over 5 years ago
- Related to Bug #15423: fork leapfrog leaks memory on FreeBSD 11.2 added
Updated by jeremyevans0 (Jeremy Evans) about 5 years ago
- Status changed from Open to Closed
Actions
Like0
Like0Like0