DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jijiang Liu <jijiang.liu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH]xen:fix an issue about memory size caculation in Dom0 driver
Date: Tue,  3 Jun 2014 21:00:15 +0800	[thread overview]
Message-ID: <1401800415-6840-1-git-send-email-jijiang.liu@intel.com> (raw)

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 <jijiang.liu@intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
Tested-by: Heng Ding <hengx.ding@intel.com> 
---
 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

             reply	other threads:[~2014-06-03 13:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03 13:00 Jijiang Liu [this message]
2014-06-09 15:55 ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1401800415-6840-1-git-send-email-jijiang.liu@intel.com \
    --to=jijiang.liu@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).