aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-24 14:10:36 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-24 14:10:36 +0000
commit174a9a1fe06aaf8df6bd6a3e874091cefedadbdd (patch)
treeb10b00016bfe994a934df84408cb7c75bade6765 /exec.c
parentc21bbcfa3ff4f6dc49fb01080ef598851aa424dd (diff)
downloadqemu-174a9a1fe06aaf8df6bd6a3e874091cefedadbdd.zip
qemu-174a9a1fe06aaf8df6bd6a3e874091cefedadbdd.tar.gz
qemu-174a9a1fe06aaf8df6bd6a3e874091cefedadbdd.tar.bz2
64 bit truncation in code_gen_buffer_size calculation (Jes Sorensen)
Don't truncate code_gen_buffer_size calculation to int, as it will give unpredicted results on 64 bit systems when booting large guests. Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5310 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index 31374da..cb9a7eb 100644
--- a/exec.c
+++ b/exec.c
@@ -410,7 +410,7 @@ static void code_gen_alloc(unsigned long tb_size)
code_gen_buffer_size = DEFAULT_CODE_GEN_BUFFER_SIZE;
#else
/* XXX: needs ajustments */
- code_gen_buffer_size = (int)(phys_ram_size / 4);
+ code_gen_buffer_size = (unsigned long)(phys_ram_size / 4);
#endif
}
if (code_gen_buffer_size < MIN_CODE_GEN_BUFFER_SIZE)