malloc.c File Reference

Go to the source code of this file.

Defines

#define ALLOC_SIZE   (4 * L4_PAGESIZE)

Functions

void * ddekit_simple_malloc (unsigned size)
 Allocate memory block via simple allocator.
void ddekit_simple_free (void *p)
 Free memory block via simple allocator.

Variables

static l4la_free_t * malloc_pool
static l4lock_t malloc_lock = L4LOCK_UNLOCKED


Define Documentation

#define ALLOC_SIZE   (4 * L4_PAGESIZE)

Definition at line 28 of file malloc.c.


Function Documentation

void ddekit_simple_free ( void *  p  ) 

Free memory block via simple allocator.

Parameters:
p pointer to memory block

Definition at line 87 of file malloc.c.

void* ddekit_simple_malloc ( unsigned  size  ) 

Allocate memory block via simple allocator.

Parameters:
size block size
Returns:
pointer to new memory block
The blocks allocated via this allocator CANNOT be used for DMA or other device operations, i.e., there exists no virt->phys mapping.

Each chunk stores its size in the first word for free() to work.

Definition at line 46 of file malloc.c.


Variable Documentation

l4lock_t malloc_lock = L4LOCK_UNLOCKED [static]

Definition at line 32 of file malloc.c.

l4la_free_t* malloc_pool [static]

Definition at line 31 of file malloc.c.


Generated on Wed Apr 11 06:39:15 2012 for DDE - The L4 Device Driver Environment by  doxygen 1.5.6