From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHqw4-0001XM-Jp for qemu-devel@nongnu.org; Tue, 28 Jun 2016 07:12:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHqw0-000078-Ig for qemu-devel@nongnu.org; Tue, 28 Jun 2016 07:12:08 -0400 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]:37509) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHqw0-000072-Bd for qemu-devel@nongnu.org; Tue, 28 Jun 2016 07:12:04 -0400 Received: by mail-wm0-x229.google.com with SMTP id a66so22424384wme.0 for ; Tue, 28 Jun 2016 04:12:04 -0700 (PDT) Sender: Paolo Bonzini References: <1467104499-27517-1-git-send-email-pl@kamp.de> <1467104499-27517-15-git-send-email-pl@kamp.de> From: Paolo Bonzini Message-ID: <24c2e218-1451-26df-c3eb-31fae9eb3097@redhat.com> Date: Tue, 28 Jun 2016 13:12:00 +0200 MIME-Version: 1.0 In-Reply-To: <1467104499-27517-15-git-send-email-pl@kamp.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 14/15] vnc-tight: make the encoding palette static List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven , qemu-devel@nongnu.org Cc: kwolf@redhat.com, peter.maydell@linaro.org, mst@redhat.com, dgilbert@redhat.com, mreitz@redhat.com, kraxel@redhat.com On 28/06/2016 11:01, Peter Lieven wrote: > @@ -201,6 +201,7 @@ typedef struct VncTight { > #endif > int levels[4]; > z_stream stream[4]; > + VncPalette palette; > } VncTight; VncTight is copied back and forth in vnc_async_encoding_start and vnc_async_encoding_end, so this should not be included in VncTight. Perhaps however if you include a VncPalette* it allows reuse and avoids fragmentation? Or perhaps you can use a thread-local static variable? Paolo