read 64-bit params for 'memory'

This commit is contained in:
Stanislav Shwartsman 2009-10-17 18:17:28 +00:00
parent fbb3d8dae5
commit aaf2937ef8

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: main.cc,v 1.408 2009-10-17 17:52:26 sshwarts Exp $
// $Id: main.cc,v 1.409 2009-10-17 18:17:28 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -1053,10 +1053,10 @@ void bx_init_hardware()
// set up memory and CPU objects
bx_param_num_c *bxp_memsize = SIM->get_param_num(BXPN_MEM_SIZE);
Bit64u memSize = bxp_memsize->get() * 1024*1024;
Bit64u memSize = bxp_memsize->get64() * BX_CONST64(1024*1024);
bx_param_num_c *bxp_host_memsize = SIM->get_param_num(BXPN_HOST_MEM_SIZE);
Bit64u hostMemSize = bxp_host_memsize->get() * 1024*1024;
Bit64u hostMemSize = bxp_host_memsize->get64() * BX_CONST64(1024*1024);
// do not allocate more host memory than needed for emulation of guest RAM
if (memSize < hostMemSize) hostMemSize = memSize;