Dynamic allocation, often called heap memory, is one of the types of memory allocation that happens inside of a computer program. A program can be divided into two logical parts: text and data. Text is the actual machine code that is executed by the computer.