From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jijiang Liu Subject: [PATCH]xen:fix an issue about memory size caculation in Dom0 driver Date: Tue, 3 Jun 2014 21:00:15 +0800 Message-ID: <1401800415-6840-1-git-send-email-jijiang.liu@intel.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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 --- lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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 a91c7ec..0f87905 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; -- 1.7.7.6