#ifndef __LINUX_BOOTMEM_INFO_H
#define __LINUX_BOOTMEM_INFO_H
#include <linux/mm.h>
#include <linux/kmemleak.h>
enum { … };
#ifdef CONFIG_HAVE_BOOTMEM_INFO_NODE
void __init register_page_bootmem_info_node(struct pglist_data *pgdat);
void get_page_bootmem(unsigned long info, struct page *page,
unsigned long type);
void put_page_bootmem(struct page *page);
static inline void free_bootmem_page(struct page *page)
{ … }
#else
static inline void register_page_bootmem_info_node(struct pglist_data *pgdat)
{
}
static inline void put_page_bootmem(struct page *page)
{
}
static inline void get_page_bootmem(unsigned long info, struct page *page,
unsigned long type)
{
}
static inline void free_bootmem_page(struct page *page)
{
kmemleak_free_part_phys(PFN_PHYS(page_to_pfn(page)), PAGE_SIZE);
free_reserved_page(page);
}
#endif
#endif