diff options
author | Timur Tabi <[email protected]> | 2008-07-23 21:28:11 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2008-07-24 10:47:20 -0700 |
commit | 2be0ffe2b29bd31d3debd0877797892ff2d91f4c (patch) | |
tree | 7f6e56b3fc5a721296851448e3facf821ef543dd /arch/powerpc/lib/code-patching.c | |
parent | 3560e249abda6bee41a07a7bf0383a6e193e2839 (diff) |
mm: add alloc_pages_exact() and free_pages_exact()
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.
I have a video driver that wants to allocate a 5MB buffer. alloc_pages()
wiill waste 3MB of physically-contiguous memory.
Signed-off-by: Timur Tabi <[email protected]>
Cc: Andi Kleen <[email protected]>
Acked-by: Mel Gorman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'arch/powerpc/lib/code-patching.c')
0 files changed, 0 insertions, 0 deletions