On Fri, May 09, 2008 at 02:54:29PM +0800, zhuzhenhua wrote: > i have a sensor driver want to malloc 2.xM SDRAM to capture > data(using DMA), so i used remap_pfn_range to malloc 3M. > But in /proc/meminfo, it showes free memory reduce 4M. i also check the > /proc/buddyinfo, it seemes too. > (i am looking inside kernel code, but not get clear at now). > > is remap_pfn_range should align to 2(n) * (page size) ? This has nothing to do with remap_pfn_range but with the power of two sized buckets used by the global free page pool. Any allocation with get_free_pages will be rounded up to the next power of two. If that's a real concern for you you could allocate a 4MB page then split the page into a 2MB and two 1MB pages and free the 1MB page again. Ralf