From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [Qemu-devel] [PATCH] Introduce QEMU_NEW() Date: Mon, 25 Jul 2011 15:18:21 +0300 Message-ID: <4E2D5F0D.2040303@redhat.com> References: <1311583872-362-1-git-send-email-avi@redhat.com> <4E2D5D7C.40208@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org To: Anthony Liguori Return-path: Received: from mx1.redhat.com ([209.132.183.28]:48949 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750864Ab1GYMSc (ORCPT ); Mon, 25 Jul 2011 08:18:32 -0400 In-Reply-To: <4E2D5D7C.40208@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: On 07/25/2011 03:11 PM, Anthony Liguori wrote: > On 07/25/2011 03:51 AM, Avi Kivity wrote: >> qemu_malloc() is type-unsafe as it returns a void pointer. Introduce >> QEMU_NEW() (and QEMU_NEWZ()), which return the correct type. > > Just use g_new() and g_new0() > These bypass qemu_malloc(). Are we okay with that? I suppose so, since many library functions can allocate memory and bypass qemu_malloc()? -- error compiling committee.c: too many arguments to function