summaryrefslogtreecommitdiff
path: root/emulators/qemu/files/patch-vl.c
blob: 44684c7ce36b2dfbdeeb900e449944fdb1102a31 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Index: qemu/vl.c
@@ -75,6 +75,7 @@
 #include <sys/stat.h>
 #ifdef __FreeBSD__
 #include <libutil.h>
+#include <sys/param.h>
 #else
 #include <util.h>
 #endif
@@ -9850,15 +9850,15 @@
         phys_ram_size += ram_size;
     }
 
+    /* init the dynamic translator */
+    cpu_exec_init_all(tb_size * 1024 * 1024);
+
     phys_ram_base = qemu_vmalloc(phys_ram_size);
     if (!phys_ram_base) {
         fprintf(stderr, "Could not allocate physical memory\n");
         exit(1);
     }
 
-    /* init the dynamic translator */
-    cpu_exec_init_all(tb_size * 1024 * 1024);
-
     bdrv_init();
 
     /* we always create the cdrom drive, even if no disk is there */