* vm_page_alloc_contig: * * Allocate a contiguous set of physical pages of the given size "npages" * from the free lists. All of the physical pages must be at or above * the given physical address "low" and below the given physical address * "high". The given value "alignment" determines the alignment of the * first physical page in the set. If the given value "boundary" is * non-zero, t
| 2235 | * VM_ALLOC_ZERO prefer a zeroed page |
| 2236 | */ |
| 2237 | vm_page_t |
| 2238 | vm_page_alloc_contig(vm_object_t object, vm_pindex_t pindex, int req, |
| 2239 | u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, |
| 2240 | vm_paddr_t boundary, vm_memattr_t memattr) |
| 2241 | { |
| 2242 | struct vm_domainset_iter di; |
| 2243 | vm_page_t m; |
| 2244 | int domain; |
| 2245 | |
| 2246 | vm_domainset_iter_page_init(&di, object, pindex, &domain, &req); |
| 2247 | do { |
| 2248 | m = vm_page_alloc_contig_domain(object, pindex, domain, req, |
| 2249 | npages, low, high, alignment, boundary, memattr); |
| 2250 | if (m != NULL) |
| 2251 | break; |
| 2252 | } while (vm_domainset_iter_page(&di, object, &domain) == 0); |
| 2253 | |
| 2254 | return (m); |
| 2255 | } |
| 2256 | |
| 2257 | vm_page_t |
| 2258 | vm_page_alloc_contig_domain(vm_object_t object, vm_pindex_t pindex, int domain, |
no test coverage detected