qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable
Date: Tue, 14 Feb 2012 06:46:17 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15

On 02/13/2012 05:16 AM, Stefan Hajnoczi wrote:
On Mon, Feb 13, 2012 at 6:29 AM, Stefan Weil<address@hidden>  wrote:
Allocating RAM for the emulated machine is perhaps the only
scenario where a core dump is indeed not reasonable. In most
other cases, out-of-memory is an indication of a QEMU internal
problem, so a core dump should be written.

Allocating guest memory could fail and we should give a reasonable
error and exit with a failure.  I think this might be the one case
where we *do* want to handle memory allocation NULL return.  In other
words, perhaps we should call memory allocating functions directly
here instead of using the typical QEMU abort-on-failure wrappers.

g_try_malloc

glib already has a suite of functions for this.

Regards,

Anthony Liguori


Stefan





reply via email to

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