qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] some questions about g_malloc in qemu


From: Kevin Wolf
Subject: Re: [Qemu-devel] some questions about g_malloc in qemu
Date: Thu, 15 Dec 2011 11:02:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0

Am 15.12.2011 10:36, schrieb Stefan Hajnoczi:
> 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().

I think this was related to qemu_malloc() and Anthony's sed run made it
refer to g_malloc(), even though it works just fine with 0 bytes. We
should probably remove this sentence.

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]