aboutsummaryrefslogtreecommitdiff
path: root/hw/vga.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-08-20 22:09:37 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-20 23:01:08 -0500
commit7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch)
tree9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /hw/vga.c
parent14015304b662e8f8ccce46c5a6927af6a14c510b (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/vga.c')
-rw-r--r--hw/vga.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/vga.c b/hw/vga.c
index 33dc478a7d..a190105b1d 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -2234,7 +2234,7 @@ MemoryRegion *vga_init_io(VGACommonState *s)
#endif
#endif /* CONFIG_BOCHS_VBE */
- vga_mem = qemu_malloc(sizeof(*vga_mem));
+ vga_mem = g_malloc(sizeof(*vga_mem));
memory_region_init_io(vga_mem, &vga_mem_ops, s,
"vga-lowmem", 0x20000);
@@ -2302,7 +2302,7 @@ int ppm_save(const char *filename, struct DisplaySurface *ds)
return -1;
fprintf(f, "P6\n%d %d\n%d\n",
ds->width, ds->height, 255);
- linebuf = qemu_malloc(ds->width * 3);
+ linebuf = g_malloc(ds->width * 3);
d1 = ds->data;
for(y = 0; y < ds->height; y++) {
d = d1;
@@ -2327,7 +2327,7 @@ int ppm_save(const char *filename, struct DisplaySurface *ds)
ret = fwrite(linebuf, 1, pbuf - linebuf, f);
(void)ret;
}
- qemu_free(linebuf);
+ g_free(linebuf);
fclose(f);
return 0;
}
@@ -2336,7 +2336,7 @@ static DisplayChangeListener* vga_screen_dump_init(DisplayState *ds)
{
DisplayChangeListener *dcl;
- dcl = qemu_mallocz(sizeof(DisplayChangeListener));
+ dcl = g_malloc0(sizeof(DisplayChangeListener));
dcl->dpy_update = vga_save_dpy_update;
dcl->dpy_resize = vga_save_dpy_resize;
dcl->dpy_refresh = vga_save_dpy_refresh;