ruby-changes:30970
From: nobu <ko1@a...>
Date: Thu, 26 Sep 2013 16:22:49 +0900 (JST)
Subject: [ruby-changes:30970] nobu:r43049 (trunk): * gc.c (vm_xrealloc): use TRY_WITH_GC().
nobu 2013-09-26 16:22:43 +0900 (Thu, 26 Sep 2013) New Revision: 43049 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43049 Log: * gc.c (vm_xrealloc): use TRY_WITH_GC(). Modified files: trunk/gc.c Index: gc.c =================================================================== --- gc.c (revision 43048) +++ gc.c (revision 43049) @@ -4766,15 +4766,7 @@ vm_xrealloc(rb_objspace_t *objspace, voi https://github.com/ruby/ruby/blob/trunk/gc.c#L4766 oldsize = ((size_t *)ptr)[0]; #endif - mem = realloc(ptr, size); - if (!mem) { - if (garbage_collect_with_gvl(objspace, 1, 1, GPR_FLAG_MALLOC)) { - mem = realloc(ptr, size); - } - if (!mem) { - ruby_memerror(); - } - } + TRY_WITH_GC(mem = realloc(ptr, size)); ATOMIC_SIZE_ADD(malloc_increase, size); #if CALC_EXACT_MALLOC_SIZE -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/