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 | e01999392c6700f85e3cb6f5fe71176199b04d09 (patch) | |
tree | 74d9b6baff5943a68e4339f1f5d7f1a668d8e421 /gc.c | |
parent | 824b38d8b71a7959e716c42557195d18cc6b5b90 (diff) | |
download | ruby-e01999392c6700f85e3cb6f5fe71176199b04d09.tar.gz ruby-e01999392c6700f85e3cb6f5fe71176199b04d09.tar.xz ruby-e01999392c6700f85e3cb6f5fe71176199b04d09.zip |
* 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: http://svn.ruby-lang.org/repos/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; |