alloc_pages_exact vs. alloc_pages

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
In order to save memory, is there any downside to using
alloc_pages_exact instead of alloc_pages?

Re: alloc_pages_exact vs. alloc_pages
http://lwn.net/Articles/287265 /

"alloc_pages_exact() is similar to alloc_pages(), except that it allocates
the minimum number of pages to fulfill the request.  This is useful if you
want to allocate a very large buffer that is slightly larger than an
even power-of-two number of pages.  In that case, alloc_pages() will waste
a lot of memory."

and

http://lxr.free-electrons.com/source/mm/page_alloc.c#L2391

"2379  * alloc_pages_exact - allocate an exact number  
physically-contiguous pages.
2380  * @size: the number of bytes to allocate
2381  * @gfp_mask: GFP flags for the allocation
2382  *
2383  * This function is similar to alloc_pages(), except that it  
allocates the
2384  * minimum number of pages to satisfy the request.  alloc_pages() can  
only
2385  * allocate memory in power-of-two pages."



Quoted text here. Click to load it


--
Using Opera's revolutionary email client: http://www.opera.com/mail /

Site Timeline