aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/tmem_xen.h
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-11-24 14:38:37 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-11-24 14:38:37 +0000
commit24cb0f67eaeb10f34392c423b5159db049f6481e (patch)
tree341426fe7741a1fe5bd70581e4338e78050b585d /xen/include/xen/tmem_xen.h
parentc8ec7e22d614c89a2c1a1faa22681e84c39509cb (diff)
downloadxen-24cb0f67eaeb10f34392c423b5159db049f6481e.tar.gz
xen-24cb0f67eaeb10f34392c423b5159db049f6481e.tar.bz2
xen-24cb0f67eaeb10f34392c423b5159db049f6481e.zip
tmem: fix freeable memory accounting error
Fix tmem accounting error that causes an "apparent" memory leak, creating false negatives when testing memory availability for launching a new domain. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Diffstat (limited to 'xen/include/xen/tmem_xen.h')
-rw-r--r--xen/include/xen/tmem_xen.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index 0e19c90680..90b860a5f9 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -229,7 +229,7 @@ static inline struct page_info *tmh_alloc_page(void *pool, int no_heap)
if ( pi == NULL && !no_heap )
pi = alloc_domheap_pages(0,0,MEMF_tmem);
ASSERT((pi == NULL) || IS_VALID_PAGE(pi));
- if ( pi != NULL )
+ if ( pi != NULL && !no_heap )
atomic_inc(&freeable_page_count);
return pi;
}