8000 merge revision(s) r45468: [Backport #9687] · github/ruby@d8eba40 · GitHub
[go: up one dir, main page]

Skip to content

Commit d8eba40

Browse files
committed
merge revision(s) r45468: [Backport ruby#9687]
* gc.c (gc_before_sweep): cap `malloc_limit' to gc_params.malloc_limit_max. It can grow and grow with such case: `loop{"a" * (1024 ** 2)}' [Bug ruby#9687] This issue is pointed by Tim Robertson. http://www.omniref.com/blog/blog/2014/03/27/ruby-garbage-collection-still-not-ready-for-production/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 23bed1e commit d8eba40

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

ChangeLog

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
Mon May 5 01:13:00 2014 Koichi Sasada <ko1@atdot.net>
2+
3+
* gc.c (gc_before_sweep): cap `malloc_limit' to
4+
gc_params.malloc_limit_max. It can grow and grow with such case:
5+
`loop{"a" * (1024 ** 2)}'
6+
[Bug #9687]
7+
8+
This issue is pointed by Tim Robertson.
9+
http://www.omniref.com/blog/blog/2014/03/27/ruby-garbage-collection-still-not-ready-for-production/
10+
111
Mon May 5 00:52:18 2014 Kenta Murata <mrkn@mrkn.jp>
212

313
* ext/bigdecimal/bigdecimal.c (BigDecimal_initialize): Insert GC guard.

gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2886,7 +2886,7 @@ gc_before_sweep(rb_objspace_t *objspace)
28862886
malloc_limit = (size_t)(inc * gc_params.malloc_limit_growth_factor);
28872887
if (gc_params.malloc_limit_max > 0 && /* ignore max-check if 0 */
28882888
malloc_limit > gc_params.malloc_limit_max) {
2889-
malloc_limit = inc;
2889+
malloc_limit = gc_params.malloc_limit_max;
28902890
}
28912891
}
28922892
else {

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#define RUBY_VERSION "2.1.2"
22
#define RUBY_RELEASE_DATE "2014-05-05"
3-
#define RUBY_PATCHLEVEL 87
3+
#define RUBY_PATCHLEVEL 88
44

55
#define RUBY_RELEASE_YEAR 2014
66
#define RUBY_RELEASE_MONTH 5

0 commit comments

Comments
 (0)
0