alloc_contig_range (9) - Linux Man Pages
alloc_contig_range: - tries to allocate given range of pages
alloc_contig_range - - tries to allocate given range of pages
int alloc_contig_range(unsigned long
start, unsigned long end, unsigned migratetype);
- start PFN to allocate
- one-past-the-last PFN to allocate
- migratetype of the underlaying pageblocks (either #MIGRATE_MOVABLE or #MIGRATE_CMA). All pageblocks in range must have the same migratetype and it must be either of the two.
The PFN range does not have to be pageblock or MAX_ORDER_NR_PAGES aligned, however it's the caller's responsibility to guarantee that we are the only thread that changes migrate type of pageblocks the pages fall in.
The PFN range must belong to a single zone.