From: William Djaja Tjokroaminata Date: 2002-08-24T04:59:15+09:00 Subject: Re: Why Ruby Uses Mark-and-Sweep GC? Hi, Probably I should ask this question instead, to people who are really familiar with the internals of Ruby object and Ruby gc: Will it be tricky to try to separate Ruby objects that will be involved in the mark-and-sweep and those that won't (from C)? For example, the simple function "rb_global_variable" registers the VALUE address that will be marked (and therefore will not be swept). Is it possible to create a perfectly valid Ruby object (VALUE) that will not be swept? In other words, the Ruby gc will not be aware of the existence of such objects. From theoretical point of view, a Ruby object (VALUE) is just a model of an object. How it is gc'ed should be independent from this model. But by just scanning functions such as "rb_newobj", it is unclear whether we can modify VALUE so that it will not participate in the sweep phase. Probably there are higher-order effects that will make simple tweaking impossible? Regards, Bill