From: David Ross Date: 2004-10-29T12:28:16+09:00 Subject: Re: [BUG] Memory leak in ruby_1_8 Yukihiro Matsumoto wrote: >Hi, > >In message "Re: [BUG] Memory leak in ruby_1_8" > on Fri, 29 Oct 2004 10:24:15 +0900, David Ross writes: > >|I have a small memory leak. I tried using cvs to get ruby_1_8 right now. >|Okay, there is no leak with 1.8.2 preview. Its in stable. I tried >|running the attached scripts and ran test.sh just to make sure like I >|always do and it started to leak. Please try searching for the leak >|while I do as well.. > >Can you check the attached patch? > > > matz. > >--- eval.c 29 Oct 2004 01:03:59 -0000 1.616.2.63 >+++ eval.c 29 Oct 2004 02:55:34 -0000 >@@ -11387,9 +11387,4 @@ rb_thread_start_0(fn, arg, th) > >- for (block = saved_block; block;) { >- struct BLOCK *tmp = block; >- >- if (tmp->frame.argc > 0) >- free(tmp->frame.argv); >- block = tmp->prev; >- free((void*)tmp); >+ if (saved_block) { >+ blk_free(saved_block); > } > > > > bada boom! The patch works fine. Thank you Matz, now I can continue knowing I'm using the most stable. I have people who I wrote/and creating applications. Now I can get back to work. David Ross -- Hazzle free packages for Ruby? RPA is available from http://www.rubyarchive.org/