Commit 4dbca20d authored by Michael Beck's avatar Michael Beck
Browse files

Use xmalloc instead of malloc

[r7877]
parent dacb503f
......@@ -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;
......
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment