[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: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] some questions about g_malloc in qemu |
Date: |
Thu, 15 Dec 2011 09:36:37 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Dec 15, 2011 at 04:28:28PM +0800, 陳韋任 wrote:
> I found this in HACKING:
>
> Please note that NULL check for the g_malloc result is redundant and
> that g_malloc() call with zero size is not allowed.
So we have:
1. You should not request 0 bytes from g_malloc().
2. g_malloc() does not return NULL (if you follow rule #1).
There is no need to check for NULL return.
Stefan
- [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, 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,
Stefan Hajnoczi <=
- 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