In operating systems, memory management is the function responsible for managing the computer's primary memory.: 105–208
The memory management function keeps track of the status of each memory location, either allocated or free. It determines how memory is allocated among competing processes, deciding which gets memory, when they receive it, and how much they are allowed. When memory is allocated it determines which memory locations will be assigned. It tracks when memory is freed or unallocated and updates the status.
This is distinct from application memory management, which is how a process manages the memory assigned to it by the operating system.