Operating system allocates and de-allocates memory partitions.
The operating system divides memory into partitions and keeps track of which memory partitions are in use and which are free. The operating system also allocates memory space to a process that asks for it and de-allocates the space when that process is done.