alloc_pages_exact vs. alloc_pages

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

Reply to
SJC
Loading thread data ...

formatting link

"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

formatting link

"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."

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

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.