From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M9ytk-0000vw-Mm for qemu-devel@nongnu.org; Fri, 29 May 2009 06:01:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M9ytf-0000ty-DN for qemu-devel@nongnu.org; Fri, 29 May 2009 06:01:11 -0400 Received: from [199.232.76.173] (port=38349 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M9ytf-0000tn-3u for qemu-devel@nongnu.org; Fri, 29 May 2009 06:01:07 -0400 Received: from srv-05.w4a.fr ([94.23.5.116]:51821 helo=mx1.w4a.fr) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M9yte-0006oX-Ht for qemu-devel@nongnu.org; Fri, 29 May 2009 06:01:06 -0400 Date: Fri, 29 May 2009 11:00:59 +0100 (GMT+01:00) From: jcd@tribudubois.net Message-ID: <33057688.68811243591259350.JavaMail.root@srv-05.w4a.fr> In-Reply-To: <18212122.68761243590277678.JavaMail.root@srv-05.w4a.fr> Subject: Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org Kevin, I certainly understand your goal ... Anyway, I will update my patche and resubmit. BTW it has to be noted that most of the time the return value of malloc/qemu_malloc is not checked which can also prove problematic whatever the qemu_malloc/malloc behavior is. JC ----- Mail Original ----- De: "Kevin Wolf" > I guess that if pattern_count/count is set to 0 we can just avoid the all processing of malloc/memset/memcmp/free anyway. > > Would you be ok with something like: > > if (Pflag && pattern_count) { > > instead of: > > if (Pflag) { To be honest, the whole point of my mail was to provoke answers like Anthony's and get qemu_malloc fixed. ;-) But sure, the change you propose in qemu-io is fine and will make things work even with current qemu_malloc. Kevin