diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | gc.c | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -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. @@ -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; } |