Hello Vimal

Thank you for the details. It was really helpful.Now let me give my
details of what I am trying to do.

I have made an extension of my own which will help the user to manually
allocate and deallocate an object using a ruby program in a stack which
my extension file is handling, and my extension does work properly.

Now I debugged some code in gc.c file and came to the point that Garbage
Collector is also marking that same object and hopefully allocating
also(which I am not sure) as a result there will duplicate objects in
the memory.To check this I asked for when the garbage collector is
freeing the memory.Is there any other way I can check if the garbage
collector is storing the object in the memory or not?

Also, I have some few questions also-

1. Why some methods/Functions inside some file starts with the name--

rb_alloc()... what does the "rb" in the method name means?

2. Is there any way to stop the ruby program in the middle of
execution?. Like sleep type of function

-- 
Posted via http://www.ruby-forum.com/.