UNIX xv6 (rev8, 9/1/15)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Functions | Variables
kalloc.c File Reference
#include "types.h"
#include "defs.h"
#include "param.h"
#include "memlayout.h"
#include "mmu.h"
#include "spinlock.h"

Go to the source code of this file.

Data Structures

struct  run
 

Functions

void freerange (void *vstart, void *vend)
 
void kinit1 (void *vstart, void *vend)
 
void kinit2 (void *vstart, void *vend)
 
void kfree (char *v)
 
char * kalloc (void)
 

Variables

char end []
 
struct {
   struct spinlock   lock
 
   int   use_lock
 
   struct run *   freelist
 
kmem
 

Function Documentation

void freerange ( void *  vstart,
void *  vend 
)

Definition at line 46 of file kalloc.c.

char* kalloc ( void  )

Definition at line 83 of file kalloc.c.

void kfree ( char *  v)

Definition at line 60 of file kalloc.c.

void kinit1 ( void *  vstart,
void *  vend 
)

Definition at line 31 of file kalloc.c.

void kinit2 ( void *  vstart,
void *  vend 
)

Definition at line 39 of file kalloc.c.

Variable Documentation

char end[]
struct run* freelist

Definition at line 22 of file kalloc.c.

struct { ... } kmem
struct spinlock lock

Definition at line 20 of file kalloc.c.

int use_lock

Definition at line 21 of file kalloc.c.