diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-10 05:43:14 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-10 05:43:14 +0000 |
commit | 2e54fe9d4dd4569032590d0cf1bcea472d422c91 (patch) | |
tree | 74d9b6baff5943a68e4339f1f5d7f1a668d8e421 /gc.c | |
parent | f8147318dd1a613e6594fc4acc931184fefeaddd (diff) | |
download | ruby-2e54fe9d4dd4569032590d0cf1bcea472d422c91.tar.gz |
* array.c, bignum.c, gc.c, numeric.c, string.c, util.c, insns.def,
missing/crypt.c, missing/vsnprintf.c, : suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -937,7 +937,7 @@ init_heap(rb_objspace_t *objspace) static void set_heaps_increment(rb_objspace_t *objspace) { - size_t next_heaps_length = heaps_used * 1.8; + size_t next_heaps_length = (size_t)(heaps_used * 1.8); heaps_inc = next_heaps_length - heaps_used; if (next_heaps_length > heaps_length) { @@ -1712,8 +1712,8 @@ gc_sweep(rb_objspace_t *objspace) size_t i; size_t live = 0, free_min = 0, do_heap_free = 0; - do_heap_free = (heaps_used * HEAP_OBJ_LIMIT) * 0.65; - free_min = (heaps_used * HEAP_OBJ_LIMIT) * 0.2; + do_heap_free = (size_t)((heaps_used * HEAP_OBJ_LIMIT) * 0.65); + free_min = (size_t)((heaps_used * HEAP_OBJ_LIMIT) * 0.2); if (free_min < FREE_MIN) { do_heap_free = heaps_used * HEAP_OBJ_LIMIT; @@ -1776,7 +1776,7 @@ gc_sweep(rb_objspace_t *objspace) } GC_PROF_SET_MALLOC_INFO; if (malloc_increase > malloc_limit) { - malloc_limit += (malloc_increase - malloc_limit) * (double)live / (live + freed); + malloc_limit += (size_t)((malloc_increase - malloc_limit) * (double)live / (live + freed)); if (malloc_limit < GC_MALLOC_LIMIT) malloc_limit = GC_MALLOC_LIMIT; } malloc_increase = 0; |