Dan Magenheimer
2009-Nov-23 19:42 UTC
[Xen-devel] [PATCH] 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> diff -r 5bfc7e343207 xen/include/xen/tmem_xen.h --- a/xen/include/xen/tmem_xen.h Mon Nov 23 11:08:51 2009 -0700 +++ b/xen/include/xen/tmem_xen.h Mon Nov 23 12:39:37 2009 -0700 @@ -229,7 +229,7 @@ static inline struct page_info *tmh_allo 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; } _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel