Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
mem.c File Reference
#include <linux/stddef.h>
#include <linux/module.h>
#include <linux/bootmem.h>
#include <linux/highmem.h>
#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/slab.h>
#include <asm/fixmap.h>
#include <asm/page.h>
#include <as-layout.h>
#include <init.h>
#include <kern.h>
#include <kern_util.h>
#include <mem_user.h>
#include <os.h>

Go to the source code of this file.

Functions

 EXPORT_SYMBOL (empty_zero_page)
 
void __init mem_init (void)
 
void __init paging_init (void)
 
void free_initmem (void)
 
pgd_tpgd_alloc (struct mm_struct *mm)
 
void pgd_free (struct mm_struct *mm, pgd_t *pgd)
 
pte_tpte_alloc_one_kernel (struct mm_struct *mm, unsigned long address)
 
pgtable_t pte_alloc_one (struct mm_struct *mm, unsigned long address)
 
voiduml_kmalloc (int size, int flags)
 

Variables

unsigned longempty_zero_page = NULL
 
pgd_t swapper_pg_dir [PTRS_PER_PGD]
 
unsigned long long highmem
 
int kmalloc_ok = 0
 

Function Documentation

EXPORT_SYMBOL ( empty_zero_page  )
void free_initmem ( void  )

Definition at line 250 of file mem.c.

void __init mem_init ( void  )

Definition at line 59 of file mem.c.

void __init paging_init ( void  )

paging_init - setup page tables

paging_init() sets up the page tables for each node of the system and frees the bootmem allocator memory for general use.

Definition at line 214 of file mem.c.

pgd_t* pgd_alloc ( struct mm_struct mm)

Definition at line 271 of file mem.c.

void pgd_free ( struct mm_struct mm,
pgd_t pgd 
)

Definition at line 284 of file mem.c.

pgtable_t pte_alloc_one ( struct mm_struct mm,
unsigned long  address 
)
read

Definition at line 297 of file mem.c.

pte_t* pte_alloc_one_kernel ( struct mm_struct mm,
unsigned long  address 
)
inline

OK, this one's a bit tricky... ioremap can get called before memory is initialized (early serial console does this) and will want to alloc a page for its mapping. No userspace pages will ever get allocated before memory is initialized so this applies only to kernel pages. In the event that this is called before memory is initialized we allocate the page using the memblock infrastructure.

Definition at line 289 of file mem.c.

void* uml_kmalloc ( int  size,
int  flags 
)

Definition at line 319 of file mem.c.

Variable Documentation

unsigned long* empty_zero_page = NULL

Definition at line 23 of file mem.c.

unsigned long long highmem

Definition at line 35 of file mem.c.

int kmalloc_ok = 0

Definition at line 36 of file mem.c.

pgd_t swapper_pg_dir[PTRS_PER_PGD]

Definition at line 32 of file mem.c.