Skip to contentSkip to conversation

[4711] Use qemu_mallocz.

Qemu-devel Paul Brook 1 participant 1 message Jun 9, 2008

lore
Share & tools
lore

Paul Brook

author
#0 lore raw

Revision: 4711

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4711
Author:   pbrook
Date:     2008-06-09 13:57:23 +0000 (Mon, 09 Jun 2008)

Log Message:
-----------
Use qemu_mallocz.

Modified Paths:
--------------
trunk/exec.c

Modified: trunk/exec.c
===================================================================

exec.c +1 -2
@@ -721,10 +721,9 @@
     int n, tb_start, tb_end;
     TranslationBlock *tb;
 
-    p->code_bitmap = qemu_malloc(TARGET_PAGE_SIZE / 8);
+    p->code_bitmap = qemu_mallocz(TARGET_PAGE_SIZE / 8);
     if (!p->code_bitmap)
         return;
-    memset(p->code_bitmap, 0, TARGET_PAGE_SIZE / 8);
 
     tb = p->first_tb;
     while (tb != NULL) {