1. A computer program product for managing tasks in a memory of a computer system, the computer program product comprising a computer readable storage medium having computer readable program code embodied therein that executes to perform operations, the operations comprising: maintaining information on computational resources consumed by tasks running in the computer system allocated memory space in the memory; using the information on the computational resources consumed by the tasks to determine inactive tasks of the tasks; modifying the allocation of the memory space allocated to at least one of the determined inactive tasks.