Michael,

MBARI3 is a factors the big rb_eval() into many smaller functions.
It's a big patch.
When I ported it from 1.6.8 to 1.8.7, it was by far the most tedious.
I put 1.6.8 and 1.8.7 side-by-side into xxdiff and worked through it
block-by-block.

You could try backing out the MBARI3 patch by replacing the
factored rb_eval() with the original one from 1.8.6.  All the rest 
of the patches should work.  You'll just have slower context
switches due to the larger call stack, but the memory leaks caused by
ghost object references should still be eliminated by MBARI4 and MBARI7. 
If that fixes the bug, you could start factoring half of rb_eval()
at a time (binary search) until you find its cause. 

I'm not surprised that you still see the memory size improvement
with STACK_WIPE_SITES set to 0x0000 -- the factored rb_eval() is
more likely to overwrite ghost object references.

- brent


Michael King-2 wrote:
> 
> On Thu, Jan 22, 2009 at 10:48 PM, Michael King <kingmt / gmail.com> wrote:
> 
>>
>>
>> Combining all these patches gets a little tricky in a couple places, if I
>> need to I will use a GC stats patched MRI for performance and profiling
>> and
>> MBARI patched for production to save memory. The REE copy-on-write is
>> just
>> an added bonus.
>>
> 
> Its starting to look like it is trickier than I originally thought...
> 
> 
>>
>>
>>> > When running test/runner.rb for the patched Ruby I am seeing the
>>> follwing
>>> > error and failure:
>>> >
>>> >   1) Failure:
>>> > test_should_propagate_signaled(TestBeginEndBlock)
>>> > [./test/ruby/test_beginendblock.rb:82]:
>>> > <""> expected to be =~
>>> > </Interrupt$/>.
>>> >
>>> >
>>> >   2) Error:
>>> > test_object_id_collision(YAML_Unit_Tests):
>>> > RuntimeError: id collision in ordered map
>>> >     ./test/yaml/test_yaml.rb:1281:in `test_object_id_collision'
>>> >
>>>
>>
>> This is interesting.... I will rerun the tests tomorrow, I'm done for
>> tonight.
>>
>> Unpatched Ruby 1.8.6 capped out at 94M
>> Ruby 1.8.6 patched with MBARI and GC-stats capped out at 42M
>> Ruby 1.8.6 patched with MBARI capped out at 53M
>>
>>
>> - Michael
>>
>>
> I recompiled Ruby 1.8.6 patched with MBARI and set the STACK_WIPE_SITES to
> 0x0000. Rerunning the test show the same failure, however the memory use
> was
> 54M. It would appear that I applied the patches wrong somehow...
> 
> - Michael
> 
> 

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