#include <linux/kernel.h>
#include <linux/slab.h>
#include "slab.h"
#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/cache.h>
#include <linux/init.h>
#include <linux/export.h>
#include <linux/rcupdate.h>
#include <linux/list.h>
#include <linux/kmemleak.h>
#include <trace/events/kmem.h>
#include <linux/atomic.h>
Go to the source code of this file.
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 493 of file slob.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 595 of file slob.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 623 of file slob.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 514 of file slob.c.
Initial value:= {
.name = "kmem_cache",
}
Definition at line 629 of file slob.c.