| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] xen/malloc: handle correctly page allocation when align > size
 When align is superior to size, we need to retrieve the order from
align during multiple page allocation. I guess it was the goal of the commit
fb034f42 "xmalloc: make close-to-PAGE_SIZE allocations more efficient".
Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
---
 xen/common/xmalloc_tlsf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/common/xmalloc_tlsf.c b/xen/common/xmalloc_tlsf.c
index d3bdfa7..c957119 100644
--- a/xen/common/xmalloc_tlsf.c
+++ b/xen/common/xmalloc_tlsf.c
@@ -531,7 +531,7 @@ static void *xmalloc_whole_pages(unsigned long size, 
unsigned long align)
     void *res, *p;
 
     if ( align > size )
-        get_order_from_bytes(align);
+        order = get_order_from_bytes(align);
 
     res = alloc_xenheap_pages(order, 0);
     if ( res == NULL )
-- 
1.8.5.3
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |