From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3a0b-0002ja-AG for qemu-devel@nongnu.org; Fri, 21 Nov 2008 12:41:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3a0a-0002iI-5D for qemu-devel@nongnu.org; Fri, 21 Nov 2008 12:41:32 -0500 Received: from [199.232.76.173] (port=40450 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3a0Z-0002i0-Uq for qemu-devel@nongnu.org; Fri, 21 Nov 2008 12:41:32 -0500 Received: from smtp.ctxuk.citrix.com ([62.200.22.115]:65412 helo=SMTP.EU.CITRIX.COM) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L3a0Z-00016R-GA for qemu-devel@nongnu.org; Fri, 21 Nov 2008 12:41:31 -0500 Message-ID: <4926F3AC.4000201@eu.citrix.com> Date: Fri, 21 Nov 2008 17:45:16 +0000 From: Stefano Stabellini MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 4 of 5] [UPDATE] DisplayState interface change References: <4926EB0B.6040007@eu.citrix.com> <200811211736.23473.paul@codesourcery.com> In-Reply-To: <200811211736.23473.paul@codesourcery.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org Paul Brook wrote: > On Friday 21 November 2008, Stefano Stabellini wrote: >> + Â Â Â Â surface->data = (uint8_t*) qemu_reallocz(surface->data, >> surface->linesize * surface->height); >> + Â Â else >> + Â Â Â Â surface->data = (uint8_t*) qemu_mallocz(surface->linesize * >> surface->height); > > Do these really need to be zeroed? > > reallocz seems like a bit of a funny concept. I doubt it's more efficient than > free/mallocz. The point of normal realloc is that is preserves the contents > of the block, even if it moves. > Actually I think they don't need to be, I have been probably overzelous. I'll do some tests to be sure, then I'll drop it.