On 15 December 2011 10:19, Stefan Hajnoczi wrote:
> On Thu, Dec 15, 2011 at 11:02:39AM +0100, Kevin Wolf wrote:
>> 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
Am 15.12.2011 11:19, schrieb Stefan Hajnoczi:
> On Thu, Dec 15, 2011 at 11:02:39AM +0100, Kevin Wolf wrote:
>> 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_mall
>> >> 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_ma
On Thu, Dec 15, 2011 at 11:02:39AM +0100, Kevin Wolf wrote:
> 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()
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
> Maybe there is insufficient memory, the return is error,
> Do we need to check the return ?
It'll abort if there is not enough memory.
http://mail.gnome.org/archives/gtk-app-devel-list/2003-September/msg00260.html
Regards,
chenwj
--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of In
On 2011年12月15日 17:36, Stefan Hajnoczi wrote:
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
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 no
Hi,
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.
Regards,
chenwj
--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2
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
> I am not sure whether it is need to check the return of g_malloc in
> qemu ?
I think not, that's why you use g_malloc as a wrapper.
Regards,
chenwj
--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
H
I am not sure whether it is need to check the return of g_malloc in
qemu ?
Thank you very much !
12 matches
Mail list logo