From: Alex Gutteridge Date: 2010-11-19T18:18:03+09:00 Subject: Re: Ruby Programming On Fri, 19 Nov 2010 10:30:30 +0900, Tridib Bandopadhyay wrote: > Hello > > I need to do this... > > The Gc is called at the runtime in Ruby. So I try to code a program > which requires memory allocation and Garbage collector. > > Now the scenario is such that--- In the gc.c file if I write some print > statement within any function.So when the gc comes for working, Will it > show me the message > which i tried to print out.? > > Regards > > Tridib Sure. There's also the GC_NOTIFY and GC_DEBUG defines in gc.c and GC::Profiler which you can call from Ruby. As people have already pointed out *any* Ruby program will require memory allocation and hence GC. -- Alex Gutteridge