summaryrefslogtreecommitdiffstats
path: root/hw/display/vga_int.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-06-11 12:19:25 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2014-08-17 23:25:24 +0200
commitad37168cbdaff061fd7c37be57de4692bd8c2c50 (patch)
treeb88da81d302b0f01b27ae8cf53365b86376cce2b /hw/display/vga_int.h
parent1dd79a237eb84a70c21b7a640f237ee603b0e74a (diff)
downloadhqemu-ad37168cbdaff061fd7c37be57de4692bd8c2c50.zip
hqemu-ad37168cbdaff061fd7c37be57de4692bd8c2c50.tar.gz
vga: do not dynamically allocate chain4_alias
Instead, add a boolean variable to indicate the presence of the region. This avoids a repeated malloc/free (later we can also avoid the add_child/unparent by changing the offset/size of the alias). Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/display/vga_int.h')
-rw-r--r--hw/display/vga_int.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h
index 5320abd..641f8f4 100644
--- a/hw/display/vga_int.h
+++ b/hw/display/vga_int.h
@@ -94,7 +94,8 @@ typedef struct VGACommonState {
uint32_t vram_size;
uint32_t vram_size_mb; /* property */
uint32_t latch;
- MemoryRegion *chain4_alias;
+ bool has_chain4_alias;
+ MemoryRegion chain4_alias;
uint8_t sr_index;
uint8_t sr[256];
uint8_t gr_index;
OpenPOWER on IntegriCloud