Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
slub_def.h File Reference
#include <linux/types.h>
#include <linux/gfp.h>
#include <linux/bug.h>
#include <linux/workqueue.h>
#include <linux/kobject.h>
#include <linux/kmemleak.h>

Go to the source code of this file.

Data Structures

struct  kmem_cache_cpu
 
struct  kmem_cache_node
 
struct  kmem_cache_order_objects
 
struct  kmem_cache
 

Macros

#define KMALLOC_MIN_SIZE   8
 
#define KMALLOC_SHIFT_LOW   ilog2(KMALLOC_MIN_SIZE)
 
#define SLUB_MAX_SIZE   (2 * PAGE_SIZE)
 
#define SLUB_PAGE_SHIFT   (PAGE_SHIFT + 2)
 
#define SLUB_DMA   (__force gfp_t)0
 

Enumerations

enum  stat_item {
  ALLOC_FASTPATH, ALLOC_SLOWPATH, FREE_FASTPATH, FREE_SLOWPATH,
  FREE_FROZEN, FREE_ADD_PARTIAL, FREE_REMOVE_PARTIAL, ALLOC_FROM_PARTIAL,
  ALLOC_SLAB, ALLOC_REFILL, ALLOC_NODE_MISMATCH, FREE_SLAB,
  CPUSLAB_FLUSH, DEACTIVATE_FULL, DEACTIVATE_EMPTY, DEACTIVATE_TO_HEAD,
  DEACTIVATE_TO_TAIL, DEACTIVATE_REMOTE_FREES, DEACTIVATE_BYPASS, ORDER_FALLBACK,
  CMPXCHG_DOUBLE_CPU_FAIL, CMPXCHG_DOUBLE_FAIL, CPU_PARTIAL_ALLOC, CPU_PARTIAL_FREE,
  CPU_PARTIAL_NODE, CPU_PARTIAL_DRAIN, NR_SLUB_STAT_ITEMS
}
 

Functions

voidkmem_cache_alloc (struct kmem_cache *, gfp_t)
 
void__kmalloc (size_t size, gfp_t flags)
 

Variables

struct kmem_cachekmalloc_caches [SLUB_PAGE_SHIFT]
 

Macro Definition Documentation

#define KMALLOC_MIN_SIZE   8

Definition at line 120 of file slub_def.h.

#define KMALLOC_SHIFT_LOW   ilog2(KMALLOC_MIN_SIZE)

Definition at line 123 of file slub_def.h.

#define SLUB_DMA   (__force gfp_t)0

Definition at line 142 of file slub_def.h.

#define SLUB_MAX_SIZE   (2 * PAGE_SIZE)

Definition at line 134 of file slub_def.h.

#define SLUB_PAGE_SHIFT   (PAGE_SHIFT + 2)

Definition at line 136 of file slub_def.h.

Enumeration Type Documentation

enum stat_item
Enumerator:
ALLOC_FASTPATH 
ALLOC_SLOWPATH 
FREE_FASTPATH 
FREE_SLOWPATH 
FREE_FROZEN 
FREE_ADD_PARTIAL 
FREE_REMOVE_PARTIAL 
ALLOC_FROM_PARTIAL 
ALLOC_SLAB 
ALLOC_REFILL 
ALLOC_NODE_MISMATCH 
FREE_SLAB 
CPUSLAB_FLUSH 
DEACTIVATE_FULL 
DEACTIVATE_EMPTY 
DEACTIVATE_TO_HEAD 
DEACTIVATE_TO_TAIL 
DEACTIVATE_REMOTE_FREES 
DEACTIVATE_BYPASS 
ORDER_FALLBACK 
CMPXCHG_DOUBLE_CPU_FAIL 
CMPXCHG_DOUBLE_FAIL 
CPU_PARTIAL_ALLOC 
CPU_PARTIAL_FREE 
CPU_PARTIAL_NODE 
CPU_PARTIAL_DRAIN 
NR_SLUB_STAT_ITEMS 

Definition at line 17 of file slub_def.h.

Function Documentation

void* __kmalloc ( size_t  size,
gfp_t  flags 
)

Definition at line 472 of file bootpz.c.

void* kmem_cache_alloc ( struct kmem_cache s,
gfp_t  gfpflags 
)

kmem_cache_alloc - Allocate an object : The cache to allocate from. : See kmalloc().

Allocate an object from this cache. The flags are only relevant if the cache has no available objects.

Definition at line 3780 of file slab.c.

Variable Documentation

struct kmem_cache* kmalloc_caches[SLUB_PAGE_SHIFT]

Definition at line 3221 of file slub.c.