From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53644 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PiDbO-0004uX-7r for qemu-devel@nongnu.org; Wed, 26 Jan 2011 17:12:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PiDbM-0006Rf-J4 for qemu-devel@nongnu.org; Wed, 26 Jan 2011 17:12:34 -0500 Received: from e31.co.us.ibm.com ([32.97.110.149]:49550) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PiDbM-0006RG-E3 for qemu-devel@nongnu.org; Wed, 26 Jan 2011 17:12:32 -0500 Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com [9.17.195.226]) by e31.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p0QLw6m7017391 for ; Wed, 26 Jan 2011 14:58:06 -0700 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p0QMCTbR167486 for ; Wed, 26 Jan 2011 15:12:30 -0700 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p0QMCSQe022590 for ; Wed, 26 Jan 2011 15:12:29 -0700 Message-ID: <4D409C48.7010306@linux.vnet.ibm.com> Date: Wed, 26 Jan 2011 16:12:24 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC 0/7] Introduce hard dependency on glib References: <1295902845-29807-1-git-send-email-aliguori@us.ibm.com> <20110126044710.GU9566@redhat.com> <4D404384.5080207@linux.vnet.ibm.com> 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: Stefan Hajnoczi Cc: Stefan Hajnoczi , Marcelo Tosatti , qemu-devel@nongnu.org, Paul Brook , Arun Bharadwaj , Paulo Bonzini On 01/26/2011 03:23 PM, Stefan Hajnoczi wrote: > > Both g_malloc() and g_try_malloc() are available where g_try_malloc() > returns NULL on failure. g_malloc() matches qemu_malloc() exit > behavior today but in the future it would be possible to use > g_try_malloc() for proper out-of-memory handling. > > But I think you're pointing out that glib uses g_malloc() internally. > That is a design flaw and basically makes g_try_malloc() useless. > No. glib cannot be used for applications that want to handle malloc() robustly. But I've never met an application that does so it doesn't really bother me. Regards, Anthony LIguori > Stefan >