[#1551] Hashes as keys — "Nathaniel Talbott" <nathaniel@...>

I was just playing around with Hash#hash and discovered that you can't use a

13 messages 2003/09/23

GC disable / enable question

From: Torsten Rueger <torsten.rueger@...>
Date: 2003-09-17 11:10:35 UTC
List: ruby-core #1533
Moi,
I'm developing a c extension, and I have to do a GC disable/enable 
around
some code that constructs ruby objects. (I've tried without, and the GC
sweeps my partly constucted objects away).

But it seems, at least in my little test program, that GC never gets 
invoked
then. I have quickly over 150 Mb used, and my little machine starts
thrashing.

So I tried with inserting a GC.start after the Gc.enable. Works fine, my
test uses a fixed 33Mb for the whole time.

But I don't really want the overhead of a full gc for every call of 
mine, so what to do ?
The way I look at ruby's gc (sources) it doesn't seem to have an 
incremental
mode, or does it ?

Thanks
   Torsten


In This Thread

Prev Next