diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-20 22:09:37 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-20 23:01:08 -0500 |
commit | 7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch) | |
tree | 9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /hw/msix.c | |
parent | 14015304b662e8f8ccce46c5a6927af6a14c510b (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/msix.c')
-rw-r--r-- | hw/msix.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -219,10 +219,10 @@ int msix_init(struct PCIDevice *dev, unsigned short nentries, if (nentries > MSIX_MAX_ENTRIES) return -EINVAL; - dev->msix_entry_used = qemu_mallocz(MSIX_MAX_ENTRIES * + dev->msix_entry_used = g_malloc0(MSIX_MAX_ENTRIES * sizeof *dev->msix_entry_used); - dev->msix_table_page = qemu_mallocz(MSIX_PAGE_SIZE); + dev->msix_table_page = g_malloc0(MSIX_PAGE_SIZE); msix_mask_all(dev, nentries); memory_region_init_io(&dev->msix_mmio, &msix_mmio_ops, dev, @@ -240,9 +240,9 @@ int msix_init(struct PCIDevice *dev, unsigned short nentries, err_config: dev->msix_entries_nr = 0; memory_region_destroy(&dev->msix_mmio); - qemu_free(dev->msix_table_page); + g_free(dev->msix_table_page); dev->msix_table_page = NULL; - qemu_free(dev->msix_entry_used); + g_free(dev->msix_entry_used); dev->msix_entry_used = NULL; return ret; } @@ -268,9 +268,9 @@ int msix_uninit(PCIDevice *dev, MemoryRegion *bar) dev->msix_entries_nr = 0; memory_region_del_subregion(bar, &dev->msix_mmio); memory_region_destroy(&dev->msix_mmio); - qemu_free(dev->msix_table_page); + g_free(dev->msix_table_page); dev->msix_table_page = NULL; - qemu_free(dev->msix_entry_used); + g_free(dev->msix_entry_used); dev->msix_entry_used = NULL; dev->cap_present &= ~QEMU_PCI_CAP_MSIX; return 0; |