diff options
author | Steven Bosscher <stevenb@suse.de> | 2003-12-01 22:59:30 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2003-12-01 22:59:30 +0000 |
commit | 47aeffac9c6f9ec347293d4bcf8c0556c6db7f5c (patch) | |
tree | 828e8c449db658913176f3c52668d0d0325b655d /gcc/ggc.h | |
parent | f26deb3d4478566f86a9aa21f54b08b457abe79c (diff) | |
download | gcc-47aeffac9c6f9ec347293d4bcf8c0556c6db7f5c.zip gcc-47aeffac9c6f9ec347293d4bcf8c0556c6db7f5c.tar.gz gcc-47aeffac9c6f9ec347293d4bcf8c0556c6db7f5c.tar.bz2 |
ggc.h (struct alloc_zone): Move forward declaration up.
* 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.
From-SVN: r74132
Diffstat (limited to 'gcc/ggc.h')
-rw-r--r-- | gcc/ggc.h | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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. */ |