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 /block/qed-l2-cache.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 'block/qed-l2-cache.c')
-rw-r--r-- | block/qed-l2-cache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/qed-l2-cache.c b/block/qed-l2-cache.c index 57518a4e7f..02b81a2e33 100644 --- a/block/qed-l2-cache.c +++ b/block/qed-l2-cache.c @@ -74,7 +74,7 @@ void qed_free_l2_cache(L2TableCache *l2_cache) QTAILQ_FOREACH_SAFE(entry, &l2_cache->entries, node, next_entry) { qemu_vfree(entry->table); - qemu_free(entry); + g_free(entry); } } @@ -89,7 +89,7 @@ CachedL2Table *qed_alloc_l2_cache_entry(L2TableCache *l2_cache) { CachedL2Table *entry; - entry = qemu_mallocz(sizeof(*entry)); + entry = g_malloc0(sizeof(*entry)); entry->ref++; trace_qed_alloc_l2_cache_entry(l2_cache, entry); @@ -111,7 +111,7 @@ void qed_unref_l2_cache_entry(CachedL2Table *entry) trace_qed_unref_l2_cache_entry(entry, entry->ref); if (entry->ref == 0) { qemu_vfree(entry->table); - qemu_free(entry); + g_free(entry); } } |