From: matz@... (Yukihiro Matsumoto) Date: 2002-08-29T01:22:22+09:00 Subject: Re: Why Ruby Uses Mark-and-Sweep GC? Hi, In message "Re: Why Ruby Uses Mark-and-Sweep GC?" on 02/08/28, William Djaja Tjokroaminata writes: |In my case, the user creates certain Ruby objects with explicit commands |and these objects exist until the end of the process, unless the user |destroys them with explicit commands. I store these objects in a global |rb_ary (and therefore automatically marked). Therefore, because I |know when these objects are created and destroyed explicitly, I want them |not to participate in the mark and sweep GC. I think I just need valid |Ruby objects (valid VALUE's) that the user can interact with, but the |creation and deletion of these VALUE's are not under the control of Ruby |GC. Will creating a second "RVALUE **heaps" such as that in gc.c be a |good idea? (Isn't that fundamentally the object model is orthogonal to |how the object memory is managed?) | |If we indeed can create VALUE's which are not under the control of Ruby |GC, then I think we really can use Ruby in real-time programming (subject |to certain restrictions on the user's Ruby script, of course), as the |number of objects that need to be marked can be made much smaller (and |therefore the marking phase will not take as much time) and be made |relatively independent of the actual number of "Ruby objects" in the |system (not order N anymore). I now understand what you want. But still, I don't think it is the way to go for the garbage-collected languages. This feeling is probably due to the fact I am highly influenced from GC researchers. matz.