diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2021-09-23 21:20:34 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2021-09-24 18:20:21 +0200 |
commit | 28f527c9598339cf834a30b5ee1f14258b8ecbb2 (patch) | |
tree | 9d43a69d857eb3ea5f4bced292059b56986c984b /gcc/ggc-page.c | |
parent | 1eb4d0d3bad1a7faa7f1734837562aea71575740 (diff) | |
parent | 2961ac45b9e19523958757e607d11c5893d6368b (diff) | |
download | gcc-28f527c9598339cf834a30b5ee1f14258b8ecbb2.zip gcc-28f527c9598339cf834a30b5ee1f14258b8ecbb2.tar.gz gcc-28f527c9598339cf834a30b5ee1f14258b8ecbb2.tar.bz2 |
Merge commit '2961ac45b9e19523958757e607d11c5893d6368b' [#247]
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); |