FreeBSD/sys/compat/linuxkpi/common/include/linux/gfp.h
/*
 * Alloc pages allocates directly from the buddy allocator on linux so
 * order specifies a power of two bucket of pages and the results
 * are expected to be aligned on the size as well.
 */
Alloc pages allocates directly from the buddy allocator on linux so
order specifies a power of two bucket of pages and the results
are expected to be aligned on the size as well.
Alloc pages allocates directly from the buddy allocator on linux so order specifies a power of two bucket of pages and the results are expected to be aligned on the size as well .
static inline struct page *
alloc_pages(gfp_t gfp_mask, unsigned int order)
{
	unsigned long page;
	size_t size;
	size = PAGE_SIZE << order;
	page = kmem_alloc_contig(kmem_arena, size, gfp_mask, 0, -1,
	    size, 0, VM_MEMATTR_DEFAULT);
	if (page == 0)
		return (NULL);
        return (virt_to_page(page));
}
static inline struct page * alloc_pages ( gfp_t gfp_mask , unsigned int order ) { unsigned long page ; size_t size ; size = PAGE_SIZE << order ; page = kmem_alloc_contig ( kmem_arena , size , gfp_mask , 0 , -1 , size , 0 , VM_MEMATTR_DEFAULT ) ; if ( page == 0 ) return ( NULL ) ; return ( virt_to_page ( page ) ) ; }
Alloc pages allocates directly from the buddy allocator on linux so
 order specifies a power of two bucket of pages and the results
 are expected to be aligned on the size as well.
Alloc pages allocates directly from the buddy allocator on linux so order specifies a power of two bucket of pages and the results are expected to be aligned on the size as well .