All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/malloc: handle correctly page allocation when align > size
@ 2014-03-07  6:46 Julien Grall
  2014-03-07 10:06 ` Jan Beulich
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Grall @ 2014-03-07  6:46 UTC (permalink / raw)
  To: xen-devel; +Cc: Julien Grall, keir, jbeulich

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@linaro.org>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-09 15:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-07  6:46 [PATCH] xen/malloc: handle correctly page allocation when align > size Julien Grall
2014-03-07 10:06 ` Jan Beulich
2014-03-09 15:25   ` Julien Grall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.