title: ruby memory usage grows forever when use thread
body: <p>OS: Windows7 32bit
  main memory : 4GB
  ruby -v : ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]</p>
  
  <pre><code># big.mkv file size : 1.45GB
  </code></pre>
  
  <p>ex1.rb</p>
  
  <pre><code>puts $$
  
  File.open("D:/test/big.mkv", "rb") do |f|
    while buff = f.read(4096)
    end
  end
  
  sleep 1000
  </code></pre>
  
  <p>ex1.rb is OK!! memory usages is about 19,756 KB.</p>
  
  <p>But...</p>
  
  <p>ex2.rb</p>
  
  <pre><code>puts $$
  
  th1 = Thread.new do
    loop do
      sleep 1
    end
  end
  
  File.open("D:/test/big.mkv", "rb") do |f|
    while buff = f.read(4096)
    end
  end
  
  th1.join
  </code></pre>
  
  <p>ex2.rb
  memory usages is increased continually... after all 1,937,948 KB</p>
  
  <p>I have to use Thread..
  Please.. Help Me!!</p>