On 02/13/2012 05:16 AM, Stefan Hajnoczi wrote:
On Mon, Feb 13, 2012 at 6:29 AM, Stefan Weil<s...@weilnetz.de> 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