From 7267c0947d7e8ae5dff7bafd932c3bc285f43e5c Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Sat, 20 Aug 2011 22:09:37 -0500 Subject: Use glib memory allocation and free functions qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori --- dma-helpers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dma-helpers.c') diff --git a/dma-helpers.c b/dma-helpers.c index ba7f897d42..4610ea0420 100644 --- a/dma-helpers.c +++ b/dma-helpers.c @@ -12,7 +12,7 @@ void qemu_sglist_init(QEMUSGList *qsg, int alloc_hint) { - qsg->sg = qemu_malloc(alloc_hint * sizeof(ScatterGatherEntry)); + qsg->sg = g_malloc(alloc_hint * sizeof(ScatterGatherEntry)); qsg->nsg = 0; qsg->nalloc = alloc_hint; qsg->size = 0; @@ -23,7 +23,7 @@ void qemu_sglist_add(QEMUSGList *qsg, target_phys_addr_t base, { if (qsg->nsg == qsg->nalloc) { qsg->nalloc = 2 * qsg->nalloc + 1; - qsg->sg = qemu_realloc(qsg->sg, qsg->nalloc * sizeof(ScatterGatherEntry)); + qsg->sg = g_realloc(qsg->sg, qsg->nalloc * sizeof(ScatterGatherEntry)); } qsg->sg[qsg->nsg].base = base; qsg->sg[qsg->nsg].len = len; @@ -33,7 +33,7 @@ void qemu_sglist_add(QEMUSGList *qsg, target_phys_addr_t base, void qemu_sglist_destroy(QEMUSGList *qsg) { - qemu_free(qsg->sg); + g_free(qsg->sg); } typedef struct { -- cgit v1.2.1