qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

ui/curses: Move arrays to .heap to save 74KiB of .bss

We only need these arrays when using the curses display.
Move them from the .bss to the .heap (sizes reported on
x86_64 host: screen[] is 64KiB, vga_to_curses 7KiB).

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

authored by

Philippe Mathieu-Daudé and committed by
Paolo Bonzini
76c51fc3 80e8c2ed

+6 -2
+6 -2
ui/curses.c
··· 54 54 }; 55 55 56 56 static DisplayChangeListener *dcl; 57 - static console_ch_t screen[160 * 100]; 57 + static console_ch_t *screen; 58 58 static WINDOW *screenpad = NULL; 59 59 static int width, height, gwidth, gheight, invalidate; 60 60 static int px, py, sminx, sminy, smaxx, smaxy; 61 61 62 62 static const char *font_charset = "CP437"; 63 - static cchar_t vga_to_curses[256]; 63 + static cchar_t *vga_to_curses; 64 64 65 65 static void curses_update(DisplayChangeListener *dcl, 66 66 int x, int y, int w, int h) ··· 405 405 static void curses_atexit(void) 406 406 { 407 407 endwin(); 408 + g_free(vga_to_curses); 409 + g_free(screen); 408 410 } 409 411 410 412 /* ··· 783 785 if (opts->u.curses.charset) { 784 786 font_charset = opts->u.curses.charset; 785 787 } 788 + screen = g_new0(console_ch_t, 160 * 100); 789 + vga_to_curses = g_new0(cchar_t, 256); 786 790 curses_setup(); 787 791 curses_keyboard_setup(); 788 792 atexit(curses_atexit);