The process of reserving a block of memory in a computer's memory hierarchy for a certain task is known as memory allocation. Because modern computers have a huge number of memory cells that must be accessed in a precise order to perform a task, memory allocation is required. Memory allocation is divided into three categories: dynamic, static, and manual. Dynamic memory allocation refers to memory that is allocated as needed. The memory which is allocated at the time of compilation is known as static allocation. The memory allocated by the programmer is known as manual allocation. When the quantity of memory requested is unknown in advance, and the programmer does not wish to employ dynamic allocation, this method of memory allocation is used.