|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [RFC 0/7] Introduce hard dependency on glib |
Date: | Wed, 26 Jan 2011 16:12:24 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Lightning/1.0b1 Thunderbird/3.0.10 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |