This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

small fixes to ggc-zone.c


This patch fixes two small bugs in ggc-zone.c

       Fix PR 22337
       * ggc-zone.c (ggc_alloc_zone_stat): Do not use CHUNK_OVERHEAD.
       (ggc_print_statistics): Initialize variable before use.

Index: ggc-zone.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ggc-zone.c,v
retrieving revision 2.27
diff -u -p -r2.27 ggc-zone.c
--- ggc-zone.c	25 Jun 2005 02:00:18 -0000	2.27
+++ ggc-zone.c	6 Jul 2005 20:23:00 -0000
@@ -1229,7 +1229,7 @@ ggc_alloc_zone_stat (size_t orig_size, s
      information is used in deciding when to collect.  */
   zone->allocated += size;
   
-  timevar_ggc_mem_total += (size + CHUNK_OVERHEAD);
+  timevar_ggc_mem_total += size;
 
 #ifdef GATHER_STATISTICS
   ggc_record_overhead (orig_size, size - orig_size, result PASS_MEM_STAT);
@@ -2049,7 +2049,7 @@ ggc_print_statistics (void)
       pte_overhead += PAGE_L2_SIZE * sizeof (struct page_entry *);
 #else
   {
-    struct page_table_chain *table;
+    page_table table = G.lookup;
     pte_overhead = 0;
     while (table)
       {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]