mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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 #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/trunk@45468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ec02cc293d
commit
835186a322
2 changed files with 11 additions and 1 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
Sat Mar 29 13:04:22 2014 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* 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 #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/
|
||||
|
||||
Fri Mar 28 19:32:13 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* struct.c (not_a_member): extract name error and use same error
|
||||
|
|
2
gc.c
2
gc.c
|
@ -2890,7 +2890,7 @@ gc_before_sweep(rb_objspace_t *objspace)
|
|||
malloc_limit = (size_t)(inc * gc_params.malloc_limit_growth_factor);
|
||||
if (gc_params.malloc_limit_max > 0 && /* ignore max-check if 0 */
|
||||
malloc_limit > gc_params.malloc_limit_max) {
|
||||
malloc_limit = inc;
|
||||
malloc_limit = gc_params.malloc_limit_max;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Reference in a new issue