From 19cc0dd4ade36a02400c5d89f89efdd3145c0bfb Mon Sep 17 00:00:00 2001 From: Geoffrey Keating Date: Fri, 10 Jan 2003 22:32:00 +0000 Subject: ggc-page.c (ggc_collect): Avoid overflow computing min_expand. * ggc-page.c (ggc_collect): Avoid overflow computing min_expand. From-SVN: r61172 --- gcc/ggc-page.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/ggc-page.c') diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c index a150c5a..4898f07 100644 --- a/gcc/ggc-page.c +++ b/gcc/ggc-page.c @@ -1509,10 +1509,10 @@ ggc_collect () /* Avoid frequent unnecessary work by skipping collection if the total allocations haven't expanded much since the last collection. */ - size_t allocated_last_gc = + float allocated_last_gc = MAX (G.allocated_last_gc, (size_t)PARAM_VALUE (GGC_MIN_HEAPSIZE) * 1024); - size_t min_expand = allocated_last_gc * PARAM_VALUE (GGC_MIN_EXPAND) / 100; + float min_expand = allocated_last_gc * PARAM_VALUE (GGC_MIN_EXPAND) / 100; if (G.allocated < allocated_last_gc + min_expand) return; -- cgit v1.1