From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHZID-0004fk-Ce for qemu-devel@nongnu.org; Mon, 07 Dec 2009 03:50:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHZI8-0004fI-Op for qemu-devel@nongnu.org; Mon, 07 Dec 2009 03:50:04 -0500 Received: from [199.232.76.173] (port=34284 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHZI8-0004fF-Jt for qemu-devel@nongnu.org; Mon, 07 Dec 2009 03:50:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:31617) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHZI8-0005Nj-3K for qemu-devel@nongnu.org; Mon, 07 Dec 2009 03:50:00 -0500 Message-ID: <4B1CC16C.9000607@redhat.com> Date: Mon, 07 Dec 2009 09:48:44 +0100 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Permit zero-sized qemu_malloc() & friends References: <4B193DA5.6040507@codemonkey.ws> <4B1A9359.8080305@redhat.com> <4B1A9811.8020108@codemonkey.ws> In-Reply-To: <4B1A9811.8020108@codemonkey.ws> 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: Anthony Liguori Cc: qemu-devel@nongnu.org, Markus Armbruster , Avi Kivity , Paul Brook Am 05.12.2009 18:27, schrieb Anthony Liguori: > If qemu_malloc() didn't carry the name "malloc()" then semantics with > size=0 would be a different discussion. But so far, all qemu_* > functions tend to behave almost exactly like their C counterparts. > Relying on the result of size=0 with malloc() is broken. Then let's rename it as qemu_getmem, do a sed run over the whole code and have sane semantics. :-) Kevin