mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 09:04:05 +02:00
merge revision(s) 39810: [Backport #8145]
* gc.c: Fix unlimited memory growth with large values of RUBY_FREE_MIN. patched by tmm1(Aman Gupta). [Bug #8095] [ruby-core:53405] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
28221e3584
commit
8e4d69ade4
3 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Mon Apr 8 00:10:59 2013 Narihiro Nakamura <authornari@gmail.com>
|
||||||
|
|
||||||
|
* gc.c: Fix unlimited memory growth with large values of
|
||||||
|
RUBY_FREE_MIN. patched by tmm1(Aman Gupta).
|
||||||
|
[Bug #8095] [ruby-core:53405]
|
||||||
|
|
||||||
Sun Apr 7 22:27:12 2013 Narihiro Nakamura <authornari@gmail.com>
|
Sun Apr 7 22:27:12 2013 Narihiro Nakamura <authornari@gmail.com>
|
||||||
|
|
||||||
* gc.c: Avoid unnecessary heap growth. patched by tmm1(Aman Gupta).
|
* gc.c: Avoid unnecessary heap growth. patched by tmm1(Aman Gupta).
|
||||||
|
|
3
gc.c
3
gc.c
|
@ -1968,8 +1968,9 @@ before_gc_sweep(rb_objspace_t *objspace)
|
||||||
objspace->heap.do_heap_free = (size_t)((heaps_used * HEAP_OBJ_LIMIT) * 0.65);
|
objspace->heap.do_heap_free = (size_t)((heaps_used * HEAP_OBJ_LIMIT) * 0.65);
|
||||||
objspace->heap.free_min = (size_t)((heaps_used * HEAP_OBJ_LIMIT) * 0.2);
|
objspace->heap.free_min = (size_t)((heaps_used * HEAP_OBJ_LIMIT) * 0.2);
|
||||||
if (objspace->heap.free_min < initial_free_min) {
|
if (objspace->heap.free_min < initial_free_min) {
|
||||||
objspace->heap.do_heap_free = heaps_used * HEAP_OBJ_LIMIT;
|
|
||||||
objspace->heap.free_min = initial_free_min;
|
objspace->heap.free_min = initial_free_min;
|
||||||
|
if (objspace->heap.do_heap_free < initial_free_min)
|
||||||
|
objspace->heap.do_heap_free = initial_free_min;
|
||||||
}
|
}
|
||||||
objspace->heap.sweep_slots = heaps;
|
objspace->heap.sweep_slots = heaps;
|
||||||
objspace->heap.free_num = 0;
|
objspace->heap.free_num = 0;
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#define RUBY_VERSION "2.0.0"
|
#define RUBY_VERSION "2.0.0"
|
||||||
#define RUBY_RELEASE_DATE "2013-04-07"
|
#define RUBY_RELEASE_DATE "2013-04-08"
|
||||||
#define RUBY_PATCHLEVEL 110
|
#define RUBY_PATCHLEVEL 111
|
||||||
|
|
||||||
#define RUBY_RELEASE_YEAR 2013
|
#define RUBY_RELEASE_YEAR 2013
|
||||||
#define RUBY_RELEASE_MONTH 4
|
#define RUBY_RELEASE_MONTH 4
|
||||||
#define RUBY_RELEASE_DAY 7
|
#define RUBY_RELEASE_DAY 8
|
||||||
|
|
||||||
#include "ruby/version.h"
|
#include "ruby/version.h"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue