ABSTRACT

Memory reuse is an important requirement for executing large-scale programs. Dierent program subunits and dynamically created objects have a lifetime. Allocated memory gets released when the corresponding program units have nished execution, or when the recursive data structures or the dynamic data object are manually released by a programmer action. e memory is allocated in the control stack or the heap. e memory from the control stack is released when the frame of the called procedure is discarded, and the memory location can be reused for allocating another frame. Heap is a common area used mainly for recursive data structures and dynamically created data objects as in object-oriented programming languages such as C++, Java, and C#. e data structures allocated in heap are extended dynamically based upon run-time programmer request, and outlive the procedures in which they were created. Heap is visible throughout the life of a program. e allocated memory in heap is recycled only aer the data entity has been released.