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

Function page_alloc

freebsd/vm/uma_core.c:1726–1736  ·  view source on GitHub ↗

* Allocates a number of pages from the system * * Arguments: * bytes The number of bytes requested * wait Shall we wait? * * Returns: * A pointer to the alloced memory or possibly * NULL if M_NOWAIT is set. */

Source from the content-addressed store, hash-verified

1724 * NULL if M_NOWAIT is set.
1725 */
1726static void *
1727page_alloc(uma_zone_t zone, vm_size_t bytes, int domain, uint8_t *pflag,
1728 int wait)
1729{
1730 void *p; /* Returned page */
1731
1732 *pflag = UMA_SLAB_KERNEL;
1733 p = (void *)kmem_malloc_domainset(DOMAINSET_FIXED(domain), bytes, wait);
1734
1735 return (p);
1736}
1737
1738#ifndef FSTACK
1739static void *

Callers 3

pcpu_page_allocFunction · 0.85
contig_allocFunction · 0.85
startup_allocFunction · 0.85

Calls 1

kmem_malloc_domainsetFunction · 0.70

Tested by

no test coverage detected