diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-09-13 10:37:49 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-09-13 10:37:49 -0700 |
commit | e252b51ccde010cbd2a146485d8045103cd99533 (patch) | |
tree | e060f101cdc32bf5e520de8e5275db9d4236b74c /gcc/ggc-page.c | |
parent | f10c7c4596dda99d2ee872c995ae4aeda65adbdf (diff) | |
parent | 104c05c5284b7822d770ee51a7d91946c7e56d50 (diff) | |
download | gcc-e252b51ccde010cbd2a146485d8045103cd99533.zip gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.gz gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.bz2 |
Merge from trunk revision 104c05c5284b7822d770ee51a7d91946c7e56d50.
Diffstat (limited to 'gcc/ggc-page.c')
-rw-r--r-- | gcc/ggc-page.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c index 4d11692..1c49643 100644 --- a/gcc/ggc-page.c +++ b/gcc/ggc-page.c @@ -1518,6 +1518,12 @@ gt_ggc_mx (const char *& x) } void +gt_ggc_mx (char *& x) +{ + gt_ggc_m_S (x); +} + +void gt_ggc_mx (unsigned char *& x) { gt_ggc_m_S (x); @@ -2178,7 +2184,7 @@ validate_free_objects (void) /* Top level mark-and-sweep routine. */ void -ggc_collect (void) +ggc_collect (enum ggc_collect mode) { /* Avoid frequent unnecessary work by skipping collection if the total allocations haven't expanded much since the last @@ -2190,7 +2196,8 @@ ggc_collect (void) memory_block_pool::trim (); float min_expand = allocated_last_gc * param_ggc_min_expand / 100; - if (G.allocated < allocated_last_gc + min_expand && !ggc_force_collect) + if (mode == GGC_COLLECT_HEURISTIC + && G.allocated < allocated_last_gc + min_expand) return; timevar_push (TV_GC); |