Ejemplo n.º 1
0
struct page *alloc_pages(int order)
{
    lock(&memory_lock);
	struct page* result = __alloc_pages(order, NT_HIGH);
    unlock(&memory_lock);
    return result;
}
Ejemplo n.º 2
0
struct page * alloc_pages_node(int nid, int gfp_mask, unsigned long order)
{
#ifdef CONFIG_NUMA
	return __alloc_pages(NODE_DATA(nid)->node_zonelists + gfp_mask, order);
#else
	return alloc_pages(gfp_mask, order);
#endif
}
Ejemplo n.º 3
0
struct page * alloc_pages_node(int nid, unsigned int gfp_mask, unsigned int order)
{
#ifdef CONFIG_NUMA
    return __alloc_pages(gfp_mask, order, NODE_DATA(nid)->node_zonelists + (gfp_mask & GFP_ZONEMASK));
#else
    return alloc_pages(gfp_mask, order);
#endif
}
Ejemplo n.º 4
0
static struct page *alloc_page_table(pte_t flags)
{
	struct page *page =
		(flags & PTE_LOW) ? __alloc_pages(0, NT_LOW) : alloc_pages(0);

	if (page) {
		memset(va(page_paddr(page)), 0, PAGE_SIZE);
		page->u.refcount = 0;
	}
	return page;
}
Ejemplo n.º 5
0
static struct page * alloc_pages_pgdat(pg_data_t *pgdat, int gfp_mask,
	unsigned long order)
{
	return __alloc_pages(pgdat->node_zonelists + gfp_mask, order);
}
Ejemplo n.º 6
0
/**
 * @brief Allocate n continuous pages.
 *
 * @return
 *    NULL if n contiguous pages could not be found
 *    0 otherwise
 */
struct page *alloc_pages(unsigned long n)
{
	TRACE("n=%d", n);
	ASSERT_NOTEQUALS(n, 0);
	return __alloc_pages(n, zones);
}
Ejemplo n.º 7
0
		T* alloc_pages(unsigned nr_pages)
		{
			return reinterpret_cast<T*>(__alloc_pages(nr_pages));
		}
Ejemplo n.º 8
0
static struct page * alloc_pages_pgdat(pg_data_t *pgdat, unsigned int gfp_mask,
                                       unsigned int order)
{
    return __alloc_pages(gfp_mask, order, pgdat->node_zonelists + (gfp_mask & GFP_ZONEMASK));
}