#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/module.h>
#include <linux/bit_spinlock.h>
#include <linux/interrupt.h>
#include <linux/bitops.h>
#include <linux/slab.h>
#include "slab.h"
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/kmemcheck.h>
#include <linux/cpu.h>
#include <linux/cpuset.h>
#include <linux/mempolicy.h>
#include <linux/ctype.h>
#include <linux/debugobjects.h>
#include <linux/kallsyms.h>
#include <linux/memory.h>
#include <linux/math64.h>
#include <linux/fault-inject.h>
#include <linux/stacktrace.h>
#include <linux/prefetch.h>
#include <trace/events/kmem.h>
#include "internal.h"
Go to the source code of this file.
|
void * | kmem_cache_alloc (struct kmem_cache *s, gfp_t gfpflags) |
|
| EXPORT_SYMBOL (kmem_cache_alloc) |
|
void | kmem_cache_free (struct kmem_cache *s, void *x) |
|
| EXPORT_SYMBOL (kmem_cache_free) |
|
unsigned int | kmem_cache_size (struct kmem_cache *s) |
|
| EXPORT_SYMBOL (kmem_cache_size) |
|
int | __kmem_cache_shutdown (struct kmem_cache *s) |
|
| EXPORT_SYMBOL (kmalloc_caches) |
|
| __setup ("slub_min_order=", setup_slub_min_order) |
|
| __setup ("slub_nomerge", setup_slub_nomerge) |
|
void * | __kmalloc (size_t size, gfp_t flags) |
|
| EXPORT_SYMBOL (__kmalloc) |
|
size_t | ksize (const void *object) |
|
| EXPORT_SYMBOL (ksize) |
|
void | kfree (const void *x) |
|
| EXPORT_SYMBOL (kfree) |
|
int | kmem_cache_shrink (struct kmem_cache *s) |
|
| EXPORT_SYMBOL (kmem_cache_shrink) |
|
void __init | kmem_cache_init (void) |
|
void __init | kmem_cache_init_late (void) |
|
struct kmem_cache * | __kmem_cache_alias (const char *name, size_t size, size_t align, unsigned long flags, void(*ctor)(void *)) |
|
int | __kmem_cache_create (struct kmem_cache *s, unsigned long flags) |
|
void * | __kmalloc_track_caller (size_t size, gfp_t gfpflags, unsigned long caller) |
|
#define __CMPXCHG_DOUBLE 0x40000000UL /* Use cmpxchg_double */ |
#define __OBJECT_POISON 0x80000000UL /* Poison object */ |
#define DEBUG_DEFAULT_FLAGS |
Value:
Definition at line 154 of file slub.c.
#define disable_higher_order_debug 0 |
#define for_each_object |
( |
|
__p, |
|
|
|
__s, |
|
|
|
__addr, |
|
|
|
__objects |
|
) |
| |
Value:
Definition at line 279 of file slub.c.
Value:
Definition at line 115 of file slub.c.
Value:
Definition at line 171 of file slub.c.
Value:
Definition at line 167 of file slub.c.
#define TRACK_ADDRS_COUNT 16 |
- Enumerator:
-
Definition at line 202 of file slub.c.
__setup |
( |
"slub_nomerge" |
, |
|
|
setup_slub_nomerge |
|
|
) |
| |
kfree - free previously allocated memory : pointer returned by kmalloc.
If is NULL, no operation is performed.
Don't free memory not originally allocated by kmalloc() or you will run into trouble.
Definition at line 3467 of file slub.c.
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 2393 of file slub.c.
kmem_cache_free - Deallocate an object : The cache the allocation was from. : The previously allocated object.
Free an object which was previously allocated from this cache.
Definition at line 2620 of file slub.c.
kmem_cache_shrink - Shrink a cache. : The cache to shrink.
Releases as many slabs as possible for a cache. To help debugging, a zero exit status indicates all slabs were released.
Definition at line 3498 of file slub.c.
ksize - get the actual amount of memory allocated for a given object : Pointer to the object
kmalloc may internally round up allocations and return more memory than requested. ksize() can be used to determine the actual amount of memory allocated. The caller may use this additional memory, even though a smaller amount of memory was initially specified with the kmalloc call. The caller must guarantee that objp points to a valid object previously allocated with either kmalloc() or kmem_cache_alloc(). The object must not be freed during the duration of the call.
Definition at line 3413 of file slub.c.