MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vm_page_alloc_contig

Function vm_page_alloc_contig

freebsd/vm/vm_page.c:2237–2255  ·  view source on GitHub ↗

* 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

Source from the content-addressed store, hash-verified

2235 * VM_ALLOC_ZERO prefer a zeroed page
2236 */
2237vm_page_t
2238vm_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
2257vm_page_t
2258vm_page_alloc_contig_domain(vm_object_t object, vm_pindex_t pindex, int domain,

Callers 5

pmap_bootstrap_la57Function · 0.85
tegra_bo_alloc_contigFunction · 0.85
shm_dotruncate_largepageFunction · 0.85
dmar_pgallocFunction · 0.85
vm_page_reclaim_runFunction · 0.85

Calls 3

vm_domainset_iter_pageFunction · 0.85

Tested by

no test coverage detected