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/cirrus_vga.c | |
parent | 14015304b662e8f8ccce46c5a6927af6a14c510b (diff) | |
download | qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.gz qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.bz2 qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.zip |
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/cirrus_vga.c')
-rw-r--r-- | hw/cirrus_vga.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index b48930994a..0f911127c5 100644 --- a/hw/cirrus_vga.c +++ b/hw/cirrus_vga.c @@ -174,8 +174,6 @@ #define CIRRUS_PNPMMIO_SIZE 0x1000 -#define ABS(a) ((signed)(a) > 0 ? a : -a) - #define BLTUNSAFE(s) \ ( \ ( /* check dst is within bounds */ \ @@ -2372,7 +2370,7 @@ static void unmap_bank(CirrusVGAState *s, unsigned bank) memory_region_del_subregion(&s->low_mem_container, s->cirrus_bank[bank]); memory_region_destroy(s->cirrus_bank[bank]); - qemu_free(s->cirrus_bank[bank]); + g_free(s->cirrus_bank[bank]); s->cirrus_bank[bank] = NULL; } } @@ -2387,7 +2385,7 @@ static void map_linear_vram_bank(CirrusVGAState *s, unsigned bank) && !((s->vga.gr[0x0B] & 0x14) == 0x14) && !(s->vga.gr[0x0B] & 0x02)) { - mr = qemu_malloc(sizeof(*mr)); + mr = g_malloc(sizeof(*mr)); memory_region_init_alias(mr, names[bank], &s->vga.vram, s->cirrus_bank_base[bank], 0x8000); memory_region_add_subregion_overlap( @@ -2903,7 +2901,7 @@ void isa_cirrus_vga_init(void) { CirrusVGAState *s; - s = qemu_mallocz(sizeof(CirrusVGAState)); + s = g_malloc0(sizeof(CirrusVGAState)); vga_common_init(&s->vga, VGA_RAM_SIZE); cirrus_init_common(s, CIRRUS_ID_CLGD5430, 0); |