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/vpc.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/vpc.c')
-rw-r--r-- | block/vpc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/block/vpc.c b/block/vpc.c index fdd5236892..cb6c570f44 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -196,7 +196,7 @@ static int vpc_open(BlockDriverState *bs, int flags) s->bitmap_size = ((s->block_size / (8 * 512)) + 511) & ~511; s->max_table_entries = be32_to_cpu(dyndisk_header->max_table_entries); - s->pagetable = qemu_malloc(s->max_table_entries * 4); + s->pagetable = g_malloc(s->max_table_entries * 4); s->bat_offset = be64_to_cpu(dyndisk_header->table_offset); if (bdrv_pread(bs->file, s->bat_offset, s->pagetable, @@ -220,7 +220,7 @@ static int vpc_open(BlockDriverState *bs, int flags) s->last_bitmap_offset = (int64_t) -1; #ifdef CACHE - s->pageentry_u8 = qemu_malloc(512); + s->pageentry_u8 = g_malloc(512); s->pageentry_u32 = s->pageentry_u8; s->pageentry_u16 = s->pageentry_u8; s->last_pagetable = -1; @@ -619,9 +619,9 @@ static int vpc_create(const char *filename, QEMUOptionParameter *options) static void vpc_close(BlockDriverState *bs) { BDRVVPCState *s = bs->opaque; - qemu_free(s->pagetable); + g_free(s->pagetable); #ifdef CACHE - qemu_free(s->pageentry_u8); + g_free(s->pageentry_u8); #endif } |