From 7267c0947d7e8ae5dff7bafd932c3bc285f43e5c Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Sat, 20 Aug 2011 22:09:37 -0500 Subject: Use glib memory allocation and free functions qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori --- cpus.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cpus.c') diff --git a/cpus.c b/cpus.c index 6bf4e3f005..c996ac5fd6 100644 --- a/cpus.c +++ b/cpus.c @@ -968,8 +968,8 @@ static void qemu_tcg_init_vcpu(void *_env) /* share a single thread for all cpus with TCG */ if (!tcg_cpu_thread) { - env->thread = qemu_mallocz(sizeof(QemuThread)); - env->halt_cond = qemu_mallocz(sizeof(QemuCond)); + env->thread = g_malloc0(sizeof(QemuThread)); + env->halt_cond = g_malloc0(sizeof(QemuCond)); qemu_cond_init(env->halt_cond); qemu_thread_create(env->thread, qemu_tcg_cpu_thread_fn, env); while (env->created == 0) { @@ -985,8 +985,8 @@ static void qemu_tcg_init_vcpu(void *_env) static void qemu_kvm_start_vcpu(CPUState *env) { - env->thread = qemu_mallocz(sizeof(QemuThread)); - env->halt_cond = qemu_mallocz(sizeof(QemuCond)); + env->thread = g_malloc0(sizeof(QemuThread)); + env->halt_cond = g_malloc0(sizeof(QemuCond)); qemu_cond_init(env->halt_cond); qemu_thread_create(env->thread, qemu_kvm_cpu_thread_fn, env); while (env->created == 0) { -- cgit 1.4.1