xv6/umalloc.c File Reference

#include "types.h"
#include "stat.h"
#include "user.h"
#include "param.h"

Go to the source code of this file.

Data Structures

union  header

Typedefs

typedef long Align
typedef union header Header

Functions

void free (void *ap)
static Headermorecore (uint nu)
void * malloc (uint nbytes)

Variables

static Header base
static Headerfreep


Typedef Documentation

typedef long Align

Definition at line 9 of file umalloc.c.

typedef union header Header

Definition at line 19 of file umalloc.c.


Function Documentation

void free ( void *  ap  ) 

Definition at line 25 of file umalloc.c.

References header::ptr, header::s, and header::size.

Referenced by mem(), and morecore().

void* malloc ( uint  nbytes  ) 

Definition at line 64 of file umalloc.c.

References morecore(), header::ptr, header::s, and header::size.

Referenced by backcmd(), execcmd(), listcmd(), mem(), pipecmd(), and redircmd().

static Header* morecore ( uint  nu  )  [static]

Definition at line 47 of file umalloc.c.

References free(), PAGE, header::s, sbrk(), and header::size.

Referenced by malloc().


Variable Documentation

Header base [static]

Definition at line 21 of file umalloc.c.

Header* freep [static]

Definition at line 22 of file umalloc.c.


Generated on Fri Jan 7 12:25:49 2011 for xv6 by  doxygen 1.5.6