diff options
author | Geoffrey Keating <geoffk@apple.com> | 2003-01-10 22:32:00 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2003-01-10 22:32:00 +0000 |
commit | 19cc0dd4ade36a02400c5d89f89efdd3145c0bfb (patch) | |
tree | c1d07e96e23f659990b99fbdf5af9548ee916540 /gcc | |
parent | 6dd05d08c4940ed65cc4c98d7fbeef100a7ce515 (diff) | |
download | gcc-19cc0dd4ade36a02400c5d89f89efdd3145c0bfb.zip gcc-19cc0dd4ade36a02400c5d89f89efdd3145c0bfb.tar.gz gcc-19cc0dd4ade36a02400c5d89f89efdd3145c0bfb.tar.bz2 |
ggc-page.c (ggc_collect): Avoid overflow computing min_expand.
* ggc-page.c (ggc_collect): Avoid overflow computing
min_expand.
From-SVN: r61172
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/ggc-page.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 29a0278..935a12c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2003-01-10 Geoffrey Keating <geoffk@apple.com> + * ggc-page.c (ggc_collect): Avoid overflow computing + min_expand. + * Makefile.in (RANLIB_FOR_TARGET): Use RANLIB when native. (RANLIB_TEST_FOR_TARGET): Delete. Don't pass down to sub-makes. Remove calls. 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; |