]> git.proxmox.com Git - qemu.git/blobdiff - vl.c
Reorder default ram_size initialization
[qemu.git] / vl.c
diff --git a/vl.c b/vl.c
index c7141274f771362fb91da92839f57a34a6782a09..d1971df4aade877b01895db7d7fdbbbe74f55fea 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -3077,6 +3077,11 @@ int main(int argc, char **argv, char **envp)
         exit(1);
     }
 
+    /* init the memory */
+    if (ram_size == 0) {
+        ram_size = DEFAULT_RAM_SIZE * 1024 * 1024;
+    }
+
     configure_accelerator();
 
     if (qemu_init_main_loop()) {
@@ -3111,11 +3116,6 @@ int main(int argc, char **argv, char **envp)
     if (foreach_device_config(DEV_BT, bt_parse))
         exit(1);
 
-    /* init the memory */
-    if (ram_size == 0) {
-        ram_size = DEFAULT_RAM_SIZE * 1024 * 1024;
-    }
-
     if (!xen_enabled()) {
         /* On 32-bit hosts, QEMU is limited by virtual address space */
         if (ram_size > (2047 << 20) && HOST_LONG_BITS == 32) {