From 00881f33e939f70ace98eaf6e9a65735dd378ba3 Mon Sep 17 00:00:00 2001 From: lauras Date: Tue, 30 Nov 2010 04:12:56 +0000 Subject: [PATCH] 2010-11-30 Laurynas Biveinis * ggc-zone.c (ggc_pch_read): Fix conditional compilation. * ggc-none.c (ggc_internal_alloc_zone_stat) (ggc_internal_cleared_alloc_zone_stat): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167284 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/ggc-none.c | 19 +++++++++++++++++++ gcc/ggc-zone.c | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index daf7fa187a0..00aa275e3fb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-11-30 Laurynas Biveinis + + * ggc-zone.c (ggc_pch_read): Fix conditional compilation. + * ggc-none.c (ggc_internal_alloc_zone_stat) + (ggc_internal_cleared_alloc_zone_stat): New. + 2010-11-29 Joakim Tjernlund * config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p): Check diff --git a/gcc/ggc-none.c b/gcc/ggc-none.c index f9c48cb8cc5..97d25b9b653 100644 --- a/gcc/ggc-none.c +++ b/gcc/ggc-none.c @@ -71,3 +71,22 @@ struct alloc_zone struct alloc_zone rtl_zone; struct alloc_zone tree_zone; struct alloc_zone tree_id_zone; + +#if defined (GGC_ZONE) && !defined (GENERATOR_FILE) + +void * +ggc_internal_alloc_zone_stat (size_t size, + struct alloc_zone * ARG_UNUSED(z) MEM_STAT_DECL) +{ + return xmalloc (size); +} + +void * +ggc_internal_cleared_alloc_zone_stat (size_t size, + struct alloc_zone * ARG_UNUSED(z) + MEM_STAT_DECL) +{ + return xcalloc (size, 1); +} + +#endif diff --git a/gcc/ggc-zone.c b/gcc/ggc-zone.c index bd68008f63b..43472be79bd 100644 --- a/gcc/ggc-zone.c +++ b/gcc/ggc-zone.c @@ -2464,7 +2464,7 @@ ggc_pch_read (FILE *f, void *addr) /* We've just read in a PCH file. So, every object that used to be allocated is now free. */ -#ifdef 0 && GATHER_STATISTICS +#ifdef GATHER_STATISTICS zone_allocate_marks (); ggc_prune_overhead_list (); zone_free_marks (); -- 2.11.0