From: billtj@... (Bill Tj) Date: 2002-07-31T03:36:48+09:00 Subject: Re: Segmentation Fault - Ruby Garbage Collection Hi, After I searched the comp.lang.ruby discussions further, I also found out that I got the concept backwards; I thought that the object that is marked is marked for deletion, as discussed in a thread with title "Help: Ruby<->C++ callbacks" in about last April. Now, clearly the symptom is like this. If I disable garbage collecter by invoking "GC.disable", my program runs without any problem. Otherwise, I get segmentation fault. Does this give a clue that the problem is very likely to be in my mark functions? Are there any more rules on how to invoke rb_gc_mark in the mark functions beside just calling rb_gc_mark for every Ruby objects inside a structure? The function prototype in Ruby 1.6.7 is rb_gc_mark (void) (what is the correct prototype? And should I recompile my Ruby installation?); can this be a source of problem? Regards, Bill ============================================================================== Alia Amin wrote in message news:<3D454FC9.1080006@cip.rz.fh-offenburg.de>... > you are looking for GC.disable perhaps ? > > hth, > alia > > > Bill Tj wrote: > > > > > > >The strange thing is that the segmentation fault still occurs even > >after I modify the mark function to do nothing (immediately returns > >void). Just for testing, is there a way to disable the garbage > >collector? Thanks. > > > >Regards, > > > >Bill > >