# Dynamic memory management

> C++ Atlas: `cppatlas.com/w/c/memory` | Source: https://en.cppreference.com/w/c/memory | Domain: Dynamic memory management | Standards: C11, C23

## Official Specification Summary (cppreference)

### 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](https://en.cppreference.com/w/cpp/memory/c)

---
Attribution: content from https://en.cppreference.com/w/c/memory (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.