diff options
author | Mark Mitchell <mark@codesourcery.com> | 1999-10-11 02:11:21 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1999-10-11 02:11:21 +0000 |
commit | 74c937ca61c1872ce7ff653c2d7fda6d4b38db30 (patch) | |
tree | 5036f98758c484314588bc1a1893a4651f5f4190 /gcc/ggc.h | |
parent | f9562f27ffae26afb22f320d27eca41f36de95a2 (diff) | |
download | gcc-74c937ca61c1872ce7ff653c2d7fda6d4b38db30.zip gcc-74c937ca61c1872ce7ff653c2d7fda6d4b38db30.tar.gz gcc-74c937ca61c1872ce7ff653c2d7fda6d4b38db30.tar.bz2 |
ggc.h (ggc_push_context): Fix comment.
* ggc.h (ggc_push_context): Fix comment.
(ggc_pop_context): Likewise.
(mark_string_if_gcable): Likewise.
* ggc-common.c (ggc_mark_rtx_children): Use
ggc_mark_string_if_gcable.
* ggc-page.c (ggc_lookup_page_table): New function.
(ggc_allocated_p): Likewise.
(mark_obj): Fix formatting.
(ggc_mark_string_if_gcable): New function.
* ggc-simple.c (ggc_allocated_strings): New variable.
(ggc_strings_used): Likewise.
(ggc_compare_addresses): New function.
(ggc_pop_context): Pop the `any' memory too.
(ggc_mark_string_if_gcable): New function.
(ggc_collect): Initialize and tear down ggc_allocated_strings.
From-SVN: r29897
Diffstat (limited to 'gcc/ggc.h')
-rw-r--r-- | gcc/ggc.h | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -66,6 +66,10 @@ extern void ggc_mark_roots PROTO((void)); extern void ggc_mark_rtx_children PROTO ((struct rtx_def *)); extern void ggc_mark_tree_children PROTO ((union tree_node *)); +/* Mark the string, but only if it was allocated in collectable + memory. */ +extern void ggc_mark_string_if_gcable PROTO ((char *)); + #define ggc_mark_rtx(RTX_EXPR) \ do { \ rtx r__ = (RTX_EXPR); \ @@ -87,11 +91,11 @@ extern void init_ggc PROTO ((void)); /* Start a new GGC context. Memory allocated in previous contexts will not be collected while the new context is active. */ -extern void ggc_pop_context PROTO ((void)); +extern void ggc_push_context PROTO ((void)); /* Finish a GC context. Any uncollected memory in the new context will be merged with the old context. */ -extern void ggc_push_context PROTO ((void)); +extern void ggc_pop_context PROTO ((void)); /* Allocation. */ struct rtx_def *ggc_alloc_rtx PROTO ((int nslots)); @@ -113,7 +117,6 @@ int ggc_set_mark_rtx PROTO ((struct rtx_def *)); int ggc_set_mark_rtvec PROTO ((struct rtvec_def *)); int ggc_set_mark_tree PROTO ((union tree_node *)); - /* Callbacks to the languages. */ /* This is the language's opportunity to mark nodes held through |