table of contents
other versions
- wheezy 3.2.78-1
KMEM_CACHE_CREATE(9) | Memory Management in Linux | KMEM_CACHE_CREATE(9) |
NAME¶
kmem_cache_create - Create a cache.SYNOPSIS¶
struct
kmem_cache * kmem_cache_create(const char * name,
size_t size, size_t align,
unsigned long flags,
void (*ctor) (void *));
ARGUMENTS¶
nameA string which is used in /proc/slabinfo to
identify this cache.
size
The size of objects to be created in this
cache.
align
The required alignment for the objects.
flags
SLAB flags
ctor
A constructor for the objects.
DESCRIPTION¶
Returns a ptr to the cache on success, NULL on failure. Cannot be called within a int, but can be interrupted. The ctor is run when new pages are allocated by the cache.COPYRIGHT¶
March 2016 | Kernel Hackers Manual 3.2. |