aboutsummaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-08-20 22:09:37 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-20 23:01:08 -0500
commit7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch)
tree9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /cpus.c
parent14015304b662e8f8ccce46c5a6927af6a14c510b (diff)
downloadqemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.zip
qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.gz
qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.bz2
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpus.c b/cpus.c
index 6bf4e3f..c996ac5 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) {