aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/exec.c b/exec.c
index 59debc9cd8..26469120d9 100644
--- a/exec.c
+++ b/exec.c
@@ -1150,6 +1150,11 @@ ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void *host,
}
if (!new_block->host) {
new_block->host = phys_mem_alloc(size);
+ if (!new_block->host) {
+ fprintf(stderr, "Cannot set up guest memory '%s': %s\n",
+ new_block->mr->name, strerror(errno));
+ exit(1);
+ }
memory_try_enable_merging(new_block->host, size);
}
}