]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c/12245 (Uses lots of memory when compiling large initialized arrays)
authorJan Hubicka <jh@suse.cz>
Mon, 23 Feb 2009 16:46:32 +0000 (17:46 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 23 Feb 2009 16:46:32 +0000 (16:46 +0000)
PR c/12245
* ggc.h (htab_create_ggc): Use ggc_free to free hashtable when resizing.

From-SVN: r144384

gcc/ChangeLog
gcc/ggc.h

index 01968baaf2aabe4328ba3075adb0a452940509fa..e63df9dad8972b63e8fc8a2cd0fb6bb18941896f 100644 (file)
@@ -1,3 +1,8 @@
+2009-02-23  Jan Hubicka  <jh@suse.cz>
+
+       PR c/12245
+       * ggc.h (htab_create_ggc): Use ggc_free to free hashtable when resizing.
+
 2009-02-23  Jan Hubicka  <jh@suse.cz>
 
        PR tree-optimization/37709                                              
index 74c36394d1c13f08990718d811a9b0b698a3168e..5b2743b3386b63970eca6163eb50cc47bf7031d3 100644 (file)
--- a/gcc/ggc.h
+++ b/gcc/ggc.h
@@ -249,7 +249,7 @@ extern void dump_ggc_loc_statistics (bool);
 #define ggc_alloc_tree(LENGTH) ((tree) ggc_alloc_zone (LENGTH, &tree_zone))
 
 #define htab_create_ggc(SIZE, HASH, EQ, DEL) \
-  htab_create_alloc (SIZE, HASH, EQ, DEL, ggc_calloc, NULL)
+  htab_create_alloc (SIZE, HASH, EQ, DEL, ggc_calloc, ggc_free)
 
 #define splay_tree_new_ggc(COMPARE)                                     \
   splay_tree_new_with_allocator (COMPARE, NULL, NULL,                   \