diff options
author | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-27 00:26:52 +0000 |
---|---|---|
committer | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-27 00:26:52 +0000 |
commit | 7d60cc603c75cb116460c7cc446891bae4462cb2 (patch) | |
tree | 4348e45b7dfeeb6d8cce2f6f38df5cb802f97b60 /gcc/ggc-none.c | |
parent | 486ca58f07fc2bc1f49ed571f507d792e21b4f1b (diff) | |
download | gcc-7d60cc603c75cb116460c7cc446891bae4462cb2.tar.gz |
2003-10-26 Daniel Berlin <dberlin@dberlin.org>
* ggc-zone.c: New file, zone allocating collector.
* configure: Accept zone option for --with-gc
* configure.in: Ditto.
* ggc.h (ggc_pch_count_object): Pass bool indicating
stringiness. Update all callers.
(ggc_pch_alloc_object): Ditto.
(ggc_pch_write_object): Ditto.
(ggc_alloc_rtx): Use typed allocation, since all RTX's are of a single
type.
(ggc_alloc_rtvec): Ditto.
(ggc_alloc_tree): Use zone allocation, since some things using this macro
aren't a single typecode.
* ggc-none.c (ggc_alloc_typed): New function.
(ggc_alloc_zone): Ditto.
* ggc-page.c: Ditto on both functions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72971 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ggc-none.c')
-rw-r--r-- | gcc/ggc-none.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ggc-none.c b/gcc/ggc-none.c index ee53e761a85..659bf931d09 100644 --- a/gcc/ggc-none.c +++ b/gcc/ggc-none.c @@ -28,6 +28,14 @@ #include "coretypes.h" #include "tm.h" #include "ggc.h" +struct alloc_zone *rtl_zone = NULL; +struct alloc_zone *garbage_zone = NULL; + +void * +ggc_alloc_typed (enum gt_types_enum gte ATTRIBUTE_UNUSED, size_t size) +{ + return xmalloc (size); +} void * ggc_alloc (size_t size) @@ -36,6 +44,12 @@ ggc_alloc (size_t size) } void * +ggc_alloc_zone (size_t size, struct alloc_zone *zone ATTRIBUTE_UNUSED) +{ + return xmalloc (size); +} + +void * ggc_alloc_cleared (size_t size) { return xcalloc (size, 1); |