diff options
author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-10 22:32:00 +0000 |
---|---|---|
committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-10 22:32:00 +0000 |
commit | 83142a4c98a0b3bb613b683b6477a3161670aa6d (patch) | |
tree | c1d07e96e23f659990b99fbdf5af9548ee916540 /gcc/ggc-page.c | |
parent | 6d7e356aea1b138273c1a5eda432db40fb34b478 (diff) | |
download | gcc-83142a4c98a0b3bb613b683b6477a3161670aa6d.tar.gz |
* ggc-page.c (ggc_collect): Avoid overflow computing
min_expand.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61172 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ggc-page.c')
-rw-r--r-- | gcc/ggc-page.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c index a150c5a88e6..4898f074ee1 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; |