Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #4749

Re: Manual Memory Management and Automatic Garbage Collection

From JK Victor <johnkvictor@yahoo.com>
Newsgroups comp.lang.ruby
Subject Re: Manual Memory Management and Automatic Garbage Collection
Date 2011-05-18 18:50 -0500
Organization Service de news de lacave.net
Message-ID <e086cab0e96df5353bb1cb4b5a0121a6@ruby-forum.com> (permalink)
References <24b916bbe5f647533b379407fffb83e9@ruby-forum.com> <313bbaeb2103f9ad4323556c4fc5730f@ruby-forum.com> <BANLkTi=NknK1176QkM=0Wo=ThHSw+KD_1w@mail.gmail.com> <ea7db33bcdb5c9faf62bd9581c3443a3@ruby-forum.com>

Show all headers | View raw


Tridib Bandopadhyay wrote in post #999550:
> So I
> was thinking of not letting the GC to come and free memory every time
> for small objects,Stopping the code. So I just want to check if it can
> be helpful or not...

Ruby has a very primitive conservative GC -- it just scans the stack 
looking for pointers. If you are a time traveler from the 1950s then 
Ruby's GC might be an interesting study.

In any case it would be easy to fool Ruby's GC, if that's what you wish: 
allocate a pointer and hide data behind the pointer. The GC won't see 
pointers which aren't on the stack. You can manage that GC-concealed 
data however you like.

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

Back to comp.lang.ruby | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Manual Memory Management and Automatic Garbage Collection Tridib Bandopadhyay <tridib04@gmail.com> - 2011-05-17 14:58 -0500
  Re: Manual Memory Management and Automatic Garbage Collection Robert Klemme <shortcutter@googlemail.com> - 2011-05-18 02:12 -0500
    Re: Manual Memory Management and Automatic Garbage Collection Tridib Bandopadhyay <tridib04@gmail.com> - 2011-05-18 17:43 -0500
      Re: Manual Memory Management and Automatic Garbage Collection Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-05-18 18:18 -0500
      Re: Manual Memory Management and Automatic Garbage Collection JK Victor <johnkvictor@yahoo.com> - 2011-05-18 18:50 -0500
      Re: Manual Memory Management and Automatic Garbage Collection Robert Klemme <shortcutter@googlemail.com> - 2011-05-19 02:44 -0500

csiph-web