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

Function vm_page_alloc_after

freebsd/vm/vm_page.c:2000–2017  ·  view source on GitHub ↗

* Allocate a page in the specified object with the given page index. To * optimize insertion of the page into the object, the caller must also specifiy * the resident page in the object with largest index smaller than the given * page index, or NULL if no such page exists. */

Source from the content-addressed store, hash-verified

1998 * page index, or NULL if no such page exists.
1999 */
2000vm_page_t
2001vm_page_alloc_after(vm_object_t object, vm_pindex_t pindex,
2002 int req, vm_page_t mpred)
2003{
2004 struct vm_domainset_iter di;
2005 vm_page_t m;
2006 int domain;
2007
2008 vm_domainset_iter_page_init(&di, object, pindex, &domain, &req);
2009 do {
2010 m = vm_page_alloc_domain_after(object, pindex, domain, req,
2011 mpred);
2012 if (m != NULL)
2013 break;
2014 } while (vm_domainset_iter_page(&di, object, &domain) == 0);
2015
2016 return (m);
2017}
2018
2019/*
2020 * Returns true if the number of free pages exceeds the minimum

Callers 2

vm_page_allocFunction · 0.85
vm_page_grab_pagesFunction · 0.85

Calls 3

vm_domainset_iter_pageFunction · 0.85

Tested by

no test coverage detected