From 4dbca20d1eec65f0db3141270820d559fb5e952d Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Tue, 6 Jun 2006 11:59:43 +0000 Subject: [PATCH] Use xmalloc instead of malloc [r7877] --- ir/ana/cdep.c | 5 +++-- ir/ana/execfreq.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ir/ana/cdep.c b/ir/ana/cdep.c index 81fdd942b..07eb2ac61 100644 --- a/ir/ana/cdep.c +++ b/ir/ana/cdep.c @@ -5,6 +5,7 @@ #include "irgwalk.h" #include "irnode.h" #include "pmap.h" +#include "xmalloc.h" #include "cdep.h" #include "irprintf.h" @@ -34,7 +35,7 @@ static void add_cdep(ir_node* node, ir_node* dep_on) #endif if (dep == NULL) { - cdep* newdep = malloc(sizeof(*newdep)); + cdep* newdep = xmalloc(sizeof(*newdep)); newdep->node = dep_on; newdep->next = NULL; @@ -47,7 +48,7 @@ static void add_cdep(ir_node* node, ir_node* dep_on) if (dep->next == NULL) break; dep = dep->next; } - newdep = malloc(sizeof(*newdep)); + newdep = xmalloc(sizeof(*newdep)); newdep->node = dep_on; newdep->next = NULL; dep->next = newdep; diff --git a/ir/ana/execfreq.c b/ir/ana/execfreq.c index 9807c1a98..ba837b552 100644 --- a/ir/ana/execfreq.c +++ b/ir/ana/execfreq.c @@ -183,9 +183,9 @@ compute_execfreq(ir_graph * irg) irg_block_walk_graph(irg, block_walker, NULL, &wd); size = set_count(freqs); - matrix = malloc(size*size*sizeof(*matrix)); + matrix = xmalloc(size*size*sizeof(*matrix)); memset(matrix, 0, size*size*sizeof(*matrix)); - rhs = malloc(size*sizeof(*rhs)); + rhs = xmalloc(size*sizeof(*rhs)); memset(rhs, 0, size*sizeof(*rhs)); set_foreach(freqs, freq) { -- 2.20.1