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>
This commit is contained in:
Anthony Liguori 2011-08-20 22:09:37 -05:00
parent 14015304b6
commit 7267c0947d
357 changed files with 1672 additions and 1674 deletions

View file

@ -1180,7 +1180,7 @@ qemu_irq *openpic_init (PCIBus *bus, MemoryRegion **pmem, int nb_cpus,
pci_register_bar(&opp->pci_dev, 0,
PCI_BASE_ADDRESS_SPACE_MEMORY, &opp->mem);
} else {
opp = qemu_mallocz(sizeof(openpic_t));
opp = g_malloc0(sizeof(openpic_t));
memory_region_init_io(&opp->mem, &openpic_ops, opp, "openpic", 0x40000);
}
@ -1644,7 +1644,7 @@ qemu_irq *mpic_init (target_phys_addr_t base, int nb_cpus,
if (nb_cpus != 1)
return NULL;
mpp = qemu_mallocz(sizeof(openpic_t));
mpp = g_malloc0(sizeof(openpic_t));
for (i = 0; i < sizeof(list)/sizeof(list[0]); i++) {
int mem_index;
@ -1676,6 +1676,6 @@ qemu_irq *mpic_init (target_phys_addr_t base, int nb_cpus,
return qemu_allocate_irqs(openpic_set_irq, mpp, mpp->max_irq);
free:
qemu_free(mpp);
g_free(mpp);
return NULL;
}