[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] some questions about g_malloc in qemu
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] some questions about g_malloc in qemu |
Date: |
Thu, 15 Dec 2011 09:19:26 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0 |
Am 15.12.2011 09:10, schrieb Zhi Hui Li:
>
> I am not sure whether it is need to check the return of g_malloc in
> qemu ?
Compare the glib manual:
http://developer.gnome.org/glib/2.30/glib-Memory-Allocation.html#g-malloc
http://developer.gnome.org/glib/2.30/glib-Memory-Allocation.html#g-try-malloc
So, g_malloc() may return NULL if the requested size is zero, and it may
abort but does not return NULL due to insufficient memory available.
HTH,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] some questions about g_malloc in qemu, Zhi Hui Li, 2011/12/15
- Re: [Qemu-devel] some questions about g_malloc in qemu, 陳韋任, 2011/12/15
- Re: [Qemu-devel] some questions about g_malloc in qemu,
Andreas Färber <=
- Re: [Qemu-devel] some questions about g_malloc in qemu, 陳韋任, 2011/12/15
- Re: [Qemu-devel] some questions about g_malloc in qemu, Stefan Hajnoczi, 2011/12/15
- Re: [Qemu-devel] some questions about g_malloc in qemu, Kevin Wolf, 2011/12/15
- Re: [Qemu-devel] some questions about g_malloc in qemu, Stefan Hajnoczi, 2011/12/15
- Re: [Qemu-devel] some questions about g_malloc in qemu, Max Filippov, 2011/12/15
- Re: [Qemu-devel] some questions about g_malloc in qemu, Kevin Wolf, 2011/12/15
- Re: [Qemu-devel] some questions about g_malloc in qemu, Peter Maydell, 2011/12/15