Revision 7267c094 hw/cirrus_vga.c
b/hw/cirrus_vga.c | ||
---|---|---|
174 | 174 |
|
175 | 175 |
#define CIRRUS_PNPMMIO_SIZE 0x1000 |
176 | 176 |
|
177 |
#define ABS(a) ((signed)(a) > 0 ? a : -a) |
|
178 |
|
|
179 | 177 |
#define BLTUNSAFE(s) \ |
180 | 178 |
( \ |
181 | 179 |
( /* check dst is within bounds */ \ |
... | ... | |
2372 | 2370 |
memory_region_del_subregion(&s->low_mem_container, |
2373 | 2371 |
s->cirrus_bank[bank]); |
2374 | 2372 |
memory_region_destroy(s->cirrus_bank[bank]); |
2375 |
qemu_free(s->cirrus_bank[bank]);
|
|
2373 |
g_free(s->cirrus_bank[bank]);
|
|
2376 | 2374 |
s->cirrus_bank[bank] = NULL; |
2377 | 2375 |
} |
2378 | 2376 |
} |
... | ... | |
2387 | 2385 |
&& !((s->vga.gr[0x0B] & 0x14) == 0x14) |
2388 | 2386 |
&& !(s->vga.gr[0x0B] & 0x02)) { |
2389 | 2387 |
|
2390 |
mr = qemu_malloc(sizeof(*mr));
|
|
2388 |
mr = g_malloc(sizeof(*mr));
|
|
2391 | 2389 |
memory_region_init_alias(mr, names[bank], &s->vga.vram, |
2392 | 2390 |
s->cirrus_bank_base[bank], 0x8000); |
2393 | 2391 |
memory_region_add_subregion_overlap( |
... | ... | |
2903 | 2901 |
{ |
2904 | 2902 |
CirrusVGAState *s; |
2905 | 2903 |
|
2906 |
s = qemu_mallocz(sizeof(CirrusVGAState));
|
|
2904 |
s = g_malloc0(sizeof(CirrusVGAState));
|
|
2907 | 2905 |
|
2908 | 2906 |
vga_common_init(&s->vga, VGA_RAM_SIZE); |
2909 | 2907 |
cirrus_init_common(s, CIRRUS_ID_CLGD5430, 0); |
Also available in: Unified diff