From: Jijiang Liu Date: Tue, 3 Jun 2014 13:00:15 +0000 (+0800) Subject: xen: fix memory size calculation X-Git-Tag: spdx-start~10772 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=28dbbd485fcd47738f978022927d3bd768b44256;p=dpdk.git xen: fix memory size calculation The unit of allocated_size is MB, so the change below is made. Otherwise, it will fail to free memory when available memory is not enough. Signed-off-by: Jijiang Liu Acked-by: Huawei Xie Tested-by: Heng Ding --- diff --git a/lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c b/lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c index 03efb4ffc6..edee86ebe8 100644 --- a/lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c +++ b/lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c @@ -447,7 +447,7 @@ dom0_memory_reserve(uint32_t rsv_size) return -ENOMEM; } - allocated_size += DOM0_MEMBLOCK_SIZE; + allocated_size += SIZE_PER_BLOCK; size = DOM0_MEMBLOCK_SIZE; vaddr = vstart;