Roger,

I'll be posting a set of patches to 1.8.7 on an ftp server
in a week or so, with a URL to it here.  Thanks for
agreeing to test it.

The "ghost VALUE references" would not be affected
by the code changes you propose.  GCC's optimizer
will just remove your attempts to initialize VALUEs to NULL.  Even if you
could prevent that (with volatile, perhaps), there would
remain many uninitialized anonymous temporaries that
you could not even access from the 'C' source code. 

- brent

P.S.  The core of 1.9 got a good deal larger due to its more sophisticated
VM and support for non-latin languages.  But, in all fairness,
I haven't looked at 1.9 seriously for almost a year now.  Maybe
it could benefit from some "minimizing love" now.


Roger Pack wrote:
> 
>> I just bang on Ruby 1.6.8 for our robotics application.
> 
> I was wondering why the older version :)
> 
>> You seem to already be doing a lot of excellent Ruby testing with current
>> versions.
>> If I spent a couple days developing these two patches for Ruby 1.8.7,
>> would you be willing to run
>> regression tests against them and to report the results here?
> 
> Absolutely.  I'll test them against some trivial stuff and a small
> rails app and see if they help memory wise and check for speed :)
> 
> 
>> P.P.S.  The way GC is currently invoked causes it to occur when that
>> stack
>> is already near its maximum depth.  This patch tries to make GC normally
>> occur is part of CHECK_INTS, when the stack tends to be shallower.
>> At that point, clearing the stack can be much more effective.
> 
> I wonder if there are less intrusive ways, like changing [from a previous
> post]
> 
>           VALUE l = rb_eval(self,node->nd_recv);
>            VALUE r = rb_eval(self,node->nd_value);
>            result = rb_reg_match(l, r);
>        }
>        break;
> 
> ...
> 
> Also re: size --doesn't 1.9 have rubygems pre-installed so that it
> isn't as large of a standard library? [just pointing out that maybe it
> could use some minimizing love still?] :)
> Thanks!
> -=R
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-ruby-core%3A19846---Bug--744--memory-leak-in-callcc--tp20447794p20819209.html
Sent from the ruby-core mailing list archive at Nabble.com.