Ruby runtimes are pinned to memory due to ChannelStream
-------------------------------------------------------

                 Key: JRUBY-2933
                 URL: http://jira.codehaus.org/browse/JRUBY-2933
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.1.3
            Reporter: Greg Fodor
            Priority: Critical


org.jruby.util.io.ChannelStream contains a reference to it's Ruby Runtime 
object. However, since it is Finalizable, there is no guarantee if or when the 
JVM will finalize the object and free it from memory. In practice, when using 
Nailgun, these ChannelStream objects hang out on the finalizer queue and hold 
all their Ruby Runtimes in memory, so we can only run a few times with Nailgun 
before we start getting out of memory errors.

I'm not 100% positive how to fix this since the runtime is actually used during 
the finalize() method of the ChannelStream. Ideally when the stream is closed 
the Ruby runtime reference should be cleared, freeing the memory in the case 
where the original runtime is disposed of. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to