Chapter 4. Memory Management in Linux
Prev
Next
Chapter 4. Memory Management in Linux
Table of Contents
The Slab Cache
User Space Memory Access
More Memory Management Functions
The Slab Cache
kmalloc
— allocate memory
kmalloc_array
— allocate memory for an array.
kcalloc
— allocate memory for an array. The memory is set to zero.
kzalloc
— allocate memory. The memory is set to zero.
kzalloc_node
— allocate zeroed memory from a particular memory node.
kmem_cache_alloc
— Allocate an object
kmem_cache_alloc_node
— Allocate an object on the specified node
kmem_cache_free
— Deallocate an object
kfree
— free previously allocated memory
ksize
— get the actual amount of memory allocated for a given object
kstrdup
— allocate space for and copy an existing string
kstrndup
— allocate space for and copy an existing string
kmemdup
— duplicate region of memory
memdup_user
— duplicate memory region from user space
__krealloc
— like
krealloc
but don't free
p
.
krealloc
— reallocate memory. The contents will remain unchanged.
kzfree
— like kfree but zero memory
get_user_pages_fast
— pin user pages in memory