aboutsummaryrefslogtreecommitdiff
path: root/hw/s390-virtio.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 /hw/s390-virtio.c
parent14015304b662e8f8ccce46c5a6927af6a14c510b (diff)
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/s390-virtio.c')
-rw-r--r--hw/s390-virtio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index abe954dc88..acbf02604b 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -165,14 +165,14 @@ static void s390_init(ram_addr_t my_ram_size,
cpu_register_physical_memory(0, my_ram_size, ram_addr);
/* allocate storage keys */
- storage_keys = qemu_mallocz(my_ram_size / TARGET_PAGE_SIZE);
+ storage_keys = g_malloc0(my_ram_size / TARGET_PAGE_SIZE);
/* init CPUs */
if (cpu_model == NULL) {
cpu_model = "host";
}
- ipi_states = qemu_malloc(sizeof(CPUState *) * smp_cpus);
+ ipi_states = g_malloc(sizeof(CPUState *) * smp_cpus);
for (i = 0; i < smp_cpus; i++) {
CPUState *tmp_env;
@@ -211,7 +211,7 @@ static void s390_init(ram_addr_t my_ram_size,
bios_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
bios_size = load_image(bios_filename, qemu_get_ram_ptr(ZIPL_LOAD_ADDR));
- qemu_free(bios_filename);
+ g_free(bios_filename);
if ((long)bios_size < 0) {
hw_error("could not load bootloader '%s'\n", bios_name);
@@ -247,7 +247,7 @@ static void s390_init(ram_addr_t my_ram_size,
DeviceState *dev;
if (!nd->model) {
- nd->model = qemu_strdup("virtio");
+ nd->model = g_strdup("virtio");
}
if (strcmp(nd->model, "virtio")) {