OSDN Git Service

* config/m68k/m68k.h (REGISTER_NAMES): Prefix each name with
[pf3gnuchains/gcc-fork.git] / gcc / ggc.h
index 4f25f73..f9d2ac2 100644 (file)
--- a/gcc/ggc.h
+++ b/gcc/ggc.h
@@ -1,5 +1,5 @@
 /* Garbage collection for the GNU compiler.
-   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -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 *);
 \f
 /* Allocation.  */
 
-/* Zone structure.  */
-struct alloc_zone;
 /* For single pass garbage.  */
 extern struct alloc_zone *garbage_zone;
 /* For regular rtl allocations.  */
@@ -206,7 +213,7 @@ extern struct alloc_zone *tree_zone;
 extern void *ggc_alloc (size_t);
 /* Allocate an object into the specified allocation zone.  */
 extern void *ggc_alloc_zone (size_t, struct alloc_zone *);
-/* Allocate an object of the specified type and size. */
+/* Allocate an object of the specified type and size.  */
 extern void *ggc_alloc_typed (enum gt_types_enum, size_t);
 /* Like ggc_alloc, but allocates cleared memory.  */
 extern void *ggc_alloc_cleared (size_t);
@@ -216,6 +223,8 @@ extern void *ggc_alloc_cleared_zone (size_t, struct alloc_zone *);
 extern void *ggc_realloc (void *, size_t);
 /* Like ggc_alloc_cleared, but performs a multiplication.  */
 extern void *ggc_calloc (size_t, size_t);
+/* Free a block.  To be used when known for certain it's not reachable.  */
+extern void ggc_free (void *);
 
 #define ggc_alloc_rtx(CODE)                    \
   ((rtx) ggc_alloc_typed (gt_ggc_e_7rtx_def, RTX_SIZE (CODE)))