Dynamic memory management

Functions

Defined in header <stdlib.h>
malloc
allocates memory
(function)
calloc
allocates and zeroes memory
(function)
realloc
expands previously allocated memory block
(function)
free
deallocates previously allocated memory
(function)
free_sized
(C23)
deallocates previously allocated sized memory
(function)
free_aligned_sized
(C23)
deallocates previously allocated sized and aligned memory
(function)
aligned_alloc
(C11)
allocates aligned memory
(function)

See also

C++ documentation for C memory management library

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/c/memory