From: Harry Ohlsen Date: 2004-02-06T14:28:47+09:00 Subject: Re: Is there any way to mark an object as "always in use" (specifically, in a C extension)? nobu.nokada@softhome.net wrote: >>There's a single hash table, that's not registered as a Ruby >>object. However, the data stored in the table are all VALUE >>objects obtained from rb_str_new2(). > > > You mean struct st_table? Sorry, I should have been more specific. The hash table is just some C code I wrote to implement one. It's only he data held in it that are Ruby objects (String). It's an interesting point, though. Maybe I could save myself some code by changing the C to use a Ruby hash. I've only learned enough about C extensions to get done what I needed. I plan to do some serious study when I get a chance. I must say, it was pretty easy to get started ... as I would expect from anything related to Ruby, of course! > If so, you may register a Hash > instance to GC and use its tbl member directly. That definitely sounds simpler. > Current ruby's GC is weak for large amounts of live objects. I have a feeling this is why REXML had a problem loading the document, because it probably needs to create quite a few other (sub-)objects for each XML tag, hence it would *really* be working hard! > Generational GC may help you, but it isn't still incorporated. I've seen mention of GGC a number of times on the list. Is there a plan to add it to Ruby 1.X.Y, or will we have to wait until version 2? Cheers, Harry O.