Patent ID: 8504594
Filing Date: 2013-08-06
Classification: G06F

Abstract:
1. A memory management method in which a heap area in a memory to which objects are allocated is divided into an internal heap to which garbage collection (GC) is applied and an external heap which is managed by program specifically and an area to which object is allocated is decided on the basis of life time of object, wherein a computer being configured to execute the memory management method comprises an input unit, a target set processing unit, memory allocation data and a program execution unit in addition to the memory constituting the internal heap and the external heap, and the input unit is configured to receive execution target program, set definition data representing sets of objects utilized by the execution target program and analysis program utilizing the sets of objects represented by the set definition data, the method comprising the following steps performed by the target set processing unit: executing the analysis program on trial to get life periods from creation time to release time in memory for the sets of objects utilized by the analysis program and calculate life times of objects on the basis of length of the gotten life periods, and storing names of sets of objects and average values of life times of objects for root class designated by the set definition data out of objects constituting the sets of the objects in a corresponding manner to each other as the memory allocation data in storage means, and the method further comprising the following steps performed by the program execution unit: when executing a creation instruction of the objects utilized by the execution target program in process of executing the execution target program, disposing a created object in the internal heap when a life period of the created object is not contained within life period of the objects for root class, and getting average value of life time corresponding to set of objects to which the created object belongs with reference to the memory allocation data, disposing the created object as a long-life object in the external heap when the gotten average value of life time is equal to or larger than an execution interval of garbage collection (GC), and disposing the created object as a short-life object in the internal heap when the gotten average value of life time is smaller than the execution interval of GC, wherein the program execution unit is configured to extract object which is to be moved from New area to Old area within the internal heap as a result of subjecting the object disposed in the internal heap to execution of Copying GC processing in process of executing the execution target program, and when the average value of life time is equal to or larger than the execution interval of GC, change the disposition destination of objects which belong to a member class to which the extracted object belongs from the internal heap to the external heap.