summaryrefslogtreecommitdiffstats
path: root/hw/xics.c
diff options
context:
space:
mode:
authorAnthony Liguori2011-08-21 05:09:37 +0200
committerAnthony Liguori2011-08-21 06:01:08 +0200
commit7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch)
tree9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /hw/xics.c
parentMake glib mandatory and fixup utils appropriately (diff)
downloadqemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.gz
qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.xz
qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.zip
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 'hw/xics.c')
-rw-r--r--hw/xics.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/xics.c b/hw/xics.c
index 13a1d25944..9bf82aaf24 100644
--- a/hw/xics.c
+++ b/hw/xics.c
@@ -440,9 +440,9 @@ struct icp_state *xics_system_init(int nr_irqs)
}
}
- icp = qemu_mallocz(sizeof(*icp));
+ icp = g_malloc0(sizeof(*icp));
icp->nr_servers = max_server_num + 1;
- icp->ss = qemu_mallocz(icp->nr_servers*sizeof(struct icp_server_state));
+ icp->ss = g_malloc0(icp->nr_servers*sizeof(struct icp_server_state));
for (i = 0; i < icp->nr_servers; i++) {
icp->ss[i].mfrr = 0xff;
@@ -467,10 +467,10 @@ struct icp_state *xics_system_init(int nr_irqs)
}
}
- ics = qemu_mallocz(sizeof(*ics));
+ ics = g_malloc0(sizeof(*ics));
ics->nr_irqs = nr_irqs;
ics->offset = 16;
- ics->irqs = qemu_mallocz(nr_irqs * sizeof(struct ics_irq_state));
+ ics->irqs = g_malloc0(nr_irqs * sizeof(struct ics_irq_state));
icp->ics = ics;
ics->icp = icp;