aboutsummaryrefslogtreecommitdiff
path: root/callgrind
diff options
context:
space:
mode:
authorweidendo <weidendo@a5019735-40e9-0310-863c-91ae7b9d1cf9>2014-08-22 17:36:05 +0000
committerweidendo <weidendo@a5019735-40e9-0310-863c-91ae7b9d1cf9>2014-08-22 17:36:05 +0000
commitbb951f9a7ed0fd115b7d63fb0d0f98034cec8e28 (patch)
tree22394ce3758821400dd65ee9557e50e6e805bec7 /callgrind
parentaf21fda2d02c726545ab1e21db2a9a5fd66102f5 (diff)
downloadvalgrind-bb951f9a7ed0fd115b7d63fb0d0f98034cec8e28.tar.gz
Cleanup. Cost array was never called anyway.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14334 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'callgrind')
-rw-r--r--callgrind/costs.c14
-rw-r--r--callgrind/costs.h4
2 files changed, 3 insertions, 15 deletions
diff --git a/callgrind/costs.c b/callgrind/costs.c
index 35c451f3e..63256c71c 100644
--- a/callgrind/costs.c
+++ b/callgrind/costs.c
@@ -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;
-}
diff --git a/callgrind/costs.h b/callgrind/costs.h
index 3fdc62947..8335f0da2 100644
--- a/callgrind/costs.h
+++ b/callgrind/costs.h
@@ -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 */