From: "Mauricio Fernández" Date: 2003-06-26T01:12:53+09:00 Subject: Re: collect info about ruby-api On Thu, Jun 26, 2003 at 01:05:10AM +0900, Simon Strandgaard wrote: > > Some references: > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/66013 > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/66025 > > If I understand you correct, then its a sort of watermark mecanism, where > you can take a snapshot of the current state and restore it later ? ???? It only makes Ruby remember where the stack starts so that it can scan it later safely (ie. doesn't try to walk off the memory and die w/ a segfault or alike). > Is it usable for rubyists whom is doing extensions/embedding ? You do normally not need it (it's called by ruby_init). You only have to be aware of how it works for cases such as the one exposed in http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/66022. If Init_stack is called in a deeper stack frame than the one where some VALUE resides, Ruby won't see the later when it scans the stack and the object will be GCed. > I think I need to see more examples of its usage before I understand. Check out the links I gave you. -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com ECRC hat keine lynx komp. seiten, sowas MUSS ja pleite gehen ;-)= -- Getty on #LinuxGER