summaryrefslogtreecommitdiffstats
path: root/crypto/arc4.c
diff options
context:
space:
mode:
authorTimur Tabi <timur@freescale.com>2008-07-24 06:28:11 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 19:47:20 +0200
commit2be0ffe2b29bd31d3debd0877797892ff2d91f4c (patch)
tree7f6e56b3fc5a721296851448e3facf821ef543dd /crypto/arc4.c
parentbootmem: replace node_boot_start in struct bootmem_data (diff)
downloadlinux-2be0ffe2b29bd31d3debd0877797892ff2d91f4c.tar.xz
linux-2be0ffe2b29bd31d3debd0877797892ff2d91f4c.zip
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 <timur@freescale.com> Cc: Andi Kleen <andi@firstfloor.org> Acked-by: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'crypto/arc4.c')
0 files changed, 0 insertions, 0 deletions