git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14334
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;
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;
-}
/* 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 {
/* 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 */