// since the summary counts are OK, free up the summary_line text
// which contains the same info.
- if (cpf->summary_line) {
- free(cpf->summary_line);
- cpf->summary_line = NULL;
- }
+ free(cpf->summary_line);
+ cpf->summary_line = NULL;
free(curr_fn);
free(curr_fl);
init_fpos(&lastFnPos);
init_apos(&lastAPos, 0, 0, 0);
- if (p) while(1) {
+ while(1) {
/* on context/function change, print old cost buffer before */
if (lastFnPos.cxt && ((*p==0) ||
}
close_dumpfile(print_fd);
- if (array) VG_(free)(array);
+ VG_(free)(array);
/* set counters of last dump */
CLG_(copy_cost)( CLG_(sets).full, ti->lastdump_cost,
//--------------------------------------------------------------
VG_(debugLog)(1, "main", "Starting the dynamic memory manager\n");
{ void* p = VG_(malloc)( "main.vm.1", 12345 );
- if (p) VG_(free)( p );
+ VG_(free)( p );
}
VG_(debugLog)(1, "main", "Dynamic memory manager is running\n");
// All just wrappers to avoid exposing arenas to tools.
+// This function never returns NULL.
void* VG_(malloc) ( const HChar* cc, SizeT nbytes )
{
return VG_(arena_malloc) ( VG_AR_CORE, cc, nbytes );
struct sched_lock *p;
p = VG_(malloc)("sched_lock", sizeof(*p));
- if (p)
- ML_(sema_init)(&p->sema);
+ ML_(sema_init)(&p->sema);
return p;
}
HChar* msg;
msg = VG_(malloc)("drd.main.dptj.1", msg_size);
- tl_assert(msg);
+
VG_(snprintf)(msg, msg_size,
"drd_post_thread_join joiner = %d, joinee = %d",
drd_joiner, drd_joinee);