Dynamic allocation of memory is required in many algorithms while the program is running. Many numerical programs will need to allocate sections of memory whose size or number depends on the particular input to the program. On the other hand, the process of reclaiming and reusing useless memory is called 'garbage collection'. Garbage collectors make it relatively easy to work with dynamically allocated memory and encourage reasonably behaved application programs.