tmem: fix freeable memory accounting error
PATCH 1/1 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 <[email protected]>
xen/include/xen/tmem_xen.h +1 -1
@@ -229,7 +229,7 @@ static inline struct page_info *tmh_alloif ( 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/include/xen/tmem_xen.h +1 -1
@@ -229,7 +229,7 @@ static inline struct page_info *tmh_alloif ( 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
[email protected]
http://lists.xensource.com/xen-devel