diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-01 22:59:30 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-01 22:59:30 +0000 |
commit | 867d54fa17b07a131758adc8b0ce1e81d263fe86 (patch) | |
tree | 828e8c449db658913176f3c52668d0d0325b655d /gcc/ggc.h | |
parent | 72983aaaa3107d9c4d65eb1e00da7021ecc0a8c2 (diff) | |
download | gcc-867d54fa17b07a131758adc8b0ce1e81d263fe86.tar.gz |
* ggc.h (struct alloc_zone): Move forward declaration up.
(new_ggc_zone): New function prototype.
(destroy_ggc_zone): Ditto.
* ggc-simple.c (new_ggc_zone): New function, does nothing.
(destroy_ggc_zone): Ditto.
* ggc-page.c (new_ggc_zone): New function, does nothing.
(destroy_ggc_zone): Ditto.
* ggc-zone.c (struct page_entry): Fix comment.
(ggc_alloc_typed): Use a switch statement instead of ifs.
(new_ggc_zone): New function to set up a new GC zone.
(destroy_ggc_zone): New function to remove a GC zone.
init_ggc): Use new_ggc_zone to set up the default zones.
(ggc_collect): Walk a list of zones, instead of just the
default zones. Report statistics using the zone name.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74132 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ggc.h')
-rw-r--r-- | gcc/ggc.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ggc.h b/gcc/ggc.h index 4f25f7373c2..3a8b57e4aba 100644 --- a/gcc/ggc.h +++ b/gcc/ggc.h @@ -141,9 +141,18 @@ extern void init_stringpool (void); /* A GC implementation must provide these functions. They are internal to the GC system. */ +/* Forward declare the zone structure. Only ggc_zone implements this. */ +struct alloc_zone; + /* Initialize the garbage collector. */ extern void init_ggc (void); +/* Start a new GGC zone. */ +extern struct alloc_zone *new_ggc_zone (const char *); + +/* Free a complete GGC zone, destroying everything in it. */ +extern void destroy_ggc_zone (struct alloc_zone *); + /* Start a new GGC context. Memory allocated in previous contexts will not be collected while the new context is active. */ extern void ggc_push_context (void); @@ -193,8 +202,6 @@ extern void ggc_pch_read (FILE *, void *); /* Allocation. */ -/* Zone structure. */ -struct alloc_zone; /* For single pass garbage. */ extern struct alloc_zone *garbage_zone; /* For regular rtl allocations. */ |