History | View | Annotate | Download (4.4 kB)
ui/vnc-palette.c: Include headers it needs
Include: - <glib.h> for g_malloc0() - <string.h> for memset()
Some of those headers were probably being included by accident becausesome other headers were including qemu-common.h, but those headersshould eventually stop including qemu-common.h....
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>
severe memory leak caused by broken palette_destroy() function
The following commit breaks the code of the function palette_destroy().
http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=commit;h=e31e3694afef58ba191cbcc6875ec243e5971268
The broken code causes a severe memory leak of 'VncPalette' structures...
vnc: palette: use a pool to reduce memory allocations
We now that the palette will never have more than 256elements. Let's use a pool to reduce malloc calls.
Signed-off-by: Corentin Chary <corentincj@iksaif.net>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vnc: palette: add palette_init calls
This allow to use palette on the stack instead of alwaysallocating them.
vnc: palette: and fill and color calls.
These two helpers are needed for zrle and zywrle.
vnc: tight: stop using qdict for palette stuff
Profiling with callgrind seems to show that a lot of time is spentin the palette code (mostly due to memory allocation and qdict to intconversion).
This patch adds a VncPalette implementation. The palette is stored...