Patent ID: 9678868
Date: 2017-06-13
CPC Classifications: G06F,Y02D

Claim:
1. A method for a device to optimize memory, comprising: when a newly created process needs to he added into a control group, detecting whether a total resource value of memory resources occupied by all processes in the control group at a current moment reaches a critical resource value, the critical resource value being a resource value when the total resource value of memory resources occupied by all processes in the control group at the current moment is less than a predetermined resource threshold but will be greater than the predetermined resource threshold if the newly created process is added into the control group; if it is detected that the total resource value of memory resources occupied by all processes in the control group at the current moment reaches the critical resource value, cancelling restriction of the predetermined resource threshold on the control group and adding the newly created process into the control group that is not restricted by the predetermined resource threshold; and performing a swap-out operation on memory resources occupied by an idle process in the control group, so that the total resource value of memory resources occupied by all processes in the control group is less than the predetermined resource threshold.