From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHEXf-0002H4-BQ for qemu-devel@nongnu.org; Sun, 06 Dec 2009 05:40:39 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHEXa-0002Gb-04 for qemu-devel@nongnu.org; Sun, 06 Dec 2009 05:40:38 -0500 Received: from [199.232.76.173] (port=46376 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHEXZ-0002GW-Oo for qemu-devel@nongnu.org; Sun, 06 Dec 2009 05:40:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42270) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHEXZ-0006Qc-7Q for qemu-devel@nongnu.org; Sun, 06 Dec 2009 05:40:33 -0500 Message-ID: <4B1B8A08.3060704@redhat.com> Date: Sun, 06 Dec 2009 12:40:08 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Permit zero-sized qemu_malloc() & friends References: <4B193DA5.6040507@codemonkey.ws> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: Paul Brook , Markus Armbruster , qemu-devel@nongnu.org On 12/06/2009 12:22 PM, malc wrote: > Here, i believe, you are inventing artificial restrictions on how > malloc behaves, i don't see anything that prevents the implementor > from setting aside a range of addresses with 31st bit set as an > indicator of "zero" allocations, and then happily giving it to the > user of malloc and consumming it in free. > The implementation needs to track which addresses it handed out, since it is required that malloc(0) != malloc(0) (unless both are NULL). -- error compiling committee.c: too many arguments to function