>>>>> "A" == =?iso-8859-1?Q?Aleksi Niemel=E4?= <iso-8859-1> writes: A> module Kernel A> def timely_gc(seconds) A> # stop gc A> GC.disable A> # make thread which sleeps and does the janitor job, and repeats A> @timely_gc = Thread.start do A> loop do A> sleep seconds perhaps I'm wrong but you need to enable the GC before a call to rb_gc() A> GC.start A> GC.disable A> end A> end A> end A> end Guy Decoux