Use xmalloc instead of malloc
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 6 Jun 2006 11:59:43 +0000 (11:59 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 6 Jun 2006 11:59:43 +0000 (11:59 +0000)
[r7877]

ir/ana/cdep.c
ir/ana/execfreq.c

index 81fdd94..07eb2ac 100644 (file)
@@ -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;
index 9807c1a..ba837b5 100644 (file)
@@ -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) {