Slab Caches
[Memory Management]

This simple slab cache emulation was introduced for the Linux USB drivers. More...

Functions

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

It's from mm/slab.c.

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

This simple slab cache emulation was introduced for the Linux USB drivers.

There are some limitations/constraints:

Requirements: (additionally to Global Requirements)


Function Documentation

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

Create slab cache

It's from mm/slab.c.

constraints:

  • max size L4_PAGESIZE
  • name, flags, dtor are ignored

Definition at line 96 of file slab.c.


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