Main Page | Modules | Class List | File List | Class Members | File Members | Related Pages

slab.c File Reference

Very simple emulation of linux slabs (kmem_cache). More...

#include <l4/slab/slab.h>
#include <l4/log/l4log.h>
#include <l4/dm_mem/dm_mem.h>
#include <l4/dde_linux/dde.h>
#include <linux/slab.h>
#include "__config.h"
#include "internal.h"

Go to the source code of this file.

Classes

struct  kmem_cache_s
 local kmem_cache to L4 slab_cache mapping More...


Defines

#define CACHE_NAMELEN   20 /** max name length for a slab cache */

Functions

void * alloc_grow (l4slab_cache_t *cache, void **data)
 Grow slab cache (allocate new memory for slabs) one page (L4_PAGESIZE) will be added.

kmem_cache_t * kmem_cache_create (const char *name, size_t size, size_t offset, unsigned long flags, void(*ctor)(void *, kmem_cache_t *, unsigned long), void(*dtor)(void *, kmem_cache_t *, unsigned long))
 Create slab cache.

int kmem_cache_destroy (kmem_cache_t *kcache)
 Finalize slab cache.

void * kmem_cache_alloc (kmem_cache_t *kcache, int flags)
 Allocate slab in cache.

void kmem_cache_free (kmem_cache_t *kcache, void *objp)
 Free slab in cache.


Detailed Description

Very simple emulation of linux slabs (kmem_cache).

Date:
08/28/2003
Author:
Gerd Grießbach <gg5@os.inf.tu-dresden.de>

Christian Helmuth <ch12@os.inf.tu-dresden.de>

Definition in file slab.c.


Function Documentation

void* alloc_grow l4slab_cache_t *  cache,
void **  data
[static]
 

Grow slab cache (allocate new memory for slabs) one page (L4_PAGESIZE) will be added.

Definition at line 64 of file slab.c.

References DEBUG_SLAB.

Referenced by kmem_cache_create().


Linux DDE, written by Christian Helmuth  © 2003 Technische Universitaet Dresden