зеркало из https://github.com/github/ruby.git
* gc.c (gc_before_sweep): cast to size_t to suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
3c5529f66d
Коммит
78a49728b2
|
@ -1,3 +1,7 @@
|
|||
Fri Sep 27 17:19:39 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* gc.c (gc_before_sweep): cast to size_t to suppress warnings.
|
||||
|
||||
Fri Sep 27 17:07:55 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* gc.c: add some fine-grained profiling codes to tuning marking phase.
|
||||
|
|
4
gc.c
4
gc.c
|
@ -2405,13 +2405,13 @@ gc_before_sweep(rb_objspace_t *objspace)
|
|||
size_t old_limit = malloc_limit;
|
||||
|
||||
if (inc > malloc_limit) {
|
||||
malloc_limit += malloc_limit * (initial_params.initial_malloc_limit_factor - 1); /* 1 > factor */
|
||||
malloc_limit += (size_t)(malloc_limit * (initial_params.initial_malloc_limit_factor - 1));
|
||||
if (malloc_limit > initial_malloc_limit_max) {
|
||||
malloc_limit = initial_malloc_limit_max;
|
||||
}
|
||||
}
|
||||
else {
|
||||
malloc_limit -= malloc_limit * ((initial_params.initial_malloc_limit_factor - 1) / 4);
|
||||
malloc_limit -= (size_t)(malloc_limit * ((initial_params.initial_malloc_limit_factor - 1) / 4));
|
||||
if (malloc_limit < initial_malloc_limit) {
|
||||
malloc_limit = initial_malloc_limit;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче