|
From: <sv...@va...> - 2014-08-22 17:36:12
|
Author: weidendo
Date: Fri Aug 22 17:36:05 2014
New Revision: 14334
Log:
Cleanup. Cost array was never called anyway.
Modified:
trunk/callgrind/costs.c
trunk/callgrind/costs.h
Modified: trunk/callgrind/costs.c
==============================================================================
--- trunk/callgrind/costs.c (original)
+++ trunk/callgrind/costs.c Fri Aug 22 17:36:05 2014
@@ -46,6 +46,8 @@
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 @@
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;
-}
Modified: trunk/callgrind/costs.h
==============================================================================
--- trunk/callgrind/costs.h (original)
+++ trunk/callgrind/costs.h Fri Aug 22 17:36:05 2014
@@ -40,7 +40,7 @@
/* 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 @@
/* 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 */
|