]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Cleanup. Cost array was never called anyway.
authorJosef Weidendorfer <Josef.Weidendorfer@gmx.de>
Fri, 22 Aug 2014 17:36:05 +0000 (17:36 +0000)
committerJosef Weidendorfer <Josef.Weidendorfer@gmx.de>
Fri, 22 Aug 2014 17:36:05 +0000 (17:36 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14334

callgrind/costs.c
callgrind/costs.h

index 35c451f3e4d87e6e1cc1397e17af8b361ec6e274..63256c71cd79c40f3588b2881edc1d0b4caab441 100644 (file)
@@ -46,6 +46,8 @@ ULong* CLG_(get_costarray)(Int size)
     CostChunk* cc  = (CostChunk*) CLG_MALLOC("cl.costs.gc.1",
                                               sizeof(CostChunk) +
                                              COSTCHUNK_SIZE * sizeof(ULong));
+    CLG_ASSERT(size < COSTCHUNK_SIZE);
+
     cc->size = COSTCHUNK_SIZE;
     cc->used = 0;
     cc->next = 0;
@@ -66,15 +68,3 @@ ULong* CLG_(get_costarray)(Int size)
 
   return ptr;
 }
-
-void CLG_(free_costarrays)()
-{
-  CostChunk* cc = cost_chunk_base, *cc_next;
-  while(cc) {
-    cc_next = cc->next;
-    VG_(free)(cc);
-    cc = cc_next;
-  }
-  cost_chunk_base = 0;
-  cost_chunk_current = 0;
-}
index 3fdc62947bf3f71da6eca7be401c239bd61a24c0..8335f0da2bc3f7e4a61f4a3fc09ab8996ba37dfd 100644 (file)
@@ -40,7 +40,7 @@ extern UInt CLG_(costarray_chunks);
 
 /* Array of 64bit costs. This is separated from other structs
  * to support a dynamic number of costs for a cost item.
- * Chunks are allocated on demand, and deallocated at program termination.
+ * Chunks are allocated on demand.
  */
 typedef struct _CostChunk CostChunk;
 struct _CostChunk {
@@ -53,7 +53,5 @@ struct _CostChunk {
 /* Allocate a number of 64bit cost values.
  * Typically used from ct_events.c */
 ULong* CLG_(get_costarray)(Int size);
-void CLG_(free_costarrays)(void);
-
 
 #endif /* CLG_COSTS */