From: Patrick G. Bridges Date: Wed, 3 Nov 2010 20:04:38 +0000 (-0600) Subject: Fixed minor bug with computing memory size due to type conversion. X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=0a95faece166467bc0a308af196a82731de5f7dc;p=palacios.git Fixed minor bug with computing memory size due to type conversion. --- diff --git a/palacios/src/palacios/vmm_config.c b/palacios/src/palacios/vmm_config.c index ecbb996..2ac99da 100644 --- a/palacios/src/palacios/vmm_config.c +++ b/palacios/src/palacios/vmm_config.c @@ -234,10 +234,10 @@ static int pre_config_vm(struct v3_vm_info * vm, v3_cfg_tree_t * vm_cfg) { } // Amount of ram the Guest will have, always in MB - vm->mem_size = atoi(memory_str) * 1024 * 1024; + vm->mem_size = (addr_t)atoi(memory_str) * 1024 * 1024; vm->mem_align = get_alignment(align_str); - PrintDebug("Alignment computed as 0x%x\n", vm->mem_align); + PrintDebug("Alignment for %lu bytes of memory computed as 0x%x\n", vm->mem_size, vm->mem_align); if (strcasecmp(vm_class, "PC") == 0) { vm->vm_class = V3_PC_VM;