Memory optimization method, device and computer storage medium
By dynamically adjusting process priorities in mobile terminals and closing low-priority processes based on memory space and activity, the problem of frequent low memory in mobile terminal memory management is solved, and device performance and user experience are improved.
Patent Information
- Application Number
- CN202010442458.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-22
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2040-05-22
AI Technical Summary
With limited memory resources, the existing technology is difficult for mobile terminals to effectively manage processes, resulting in frequent entry into low memory states, affecting device performance and user experience.
By determining the real-time priority of running processes, dynamically adjust process priorities based on memory space size and process activity, close low-priority processes to free up resources, and avoid low memory state.
Improves the performance and user experience of terminal devices, reduces the frequency of low memory state, and optimizes memory management.
Smart Images

Figure CN113722080B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to memory optimization technology, and in particular to a memory optimization method, device, and computer storage medium. Background Art
[0002] The memory resources of mobile terminals are limited, and every time an application APP is launched, one or more processes will occupy memory resources. Therefore, within the limited resources, in order to create new processes or run more important processes, old processes must be cleared to reclaim memory and other resources. In order to determine which processes to retain or terminate, the system places each process in an "importance hierarchy" based on the components running in the process and the status of these components. When necessary, the system will first kill the least important process, then kill the process with a slightly lower importance, and so on, to reclaim system resources. One of the ways to kill processes is lowmemkiller, which is mainly triggered when the upper-level killing strategy is completed, but the memory required to run a new process or an important process is still not enough. Summary of the Invention
[0003] To overcome the problems existing in the related art, the present disclosure provides a memory optimization method, device and computer storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a memory optimization method is provided, which is applied to a mobile terminal and includes:
[0005] When the first information of the running process meets the preset conditions, determining the real-time priority of each process in the running process, wherein the first information of the running process includes at least the size of the memory space occupied by the running process and / or the total number of the running processes;
[0006] Close any running process whose real-time priority is lower than the preset priority threshold;
[0007] The preset conditions include at least one of the following:
[0008] The memory space occupied by the running process reaches or exceeds a preset first memory threshold;
[0009] The total number of running processes reaches or exceeds the preset total number of processes threshold.
[0010] In the above memory optimization method, determining the real-time priority of each process in the running process includes:
[0011] The real-time priority of each process is determined based on the initial priority of each process in the running process and the second information of each process, wherein the initial priority of each process is included in the attribute information of the process, and the second information of each process includes at least the size of the occupied memory space and / or the process activity.
[0012] Wherein, in the above-mentioned memory optimization method, determining the real-time priority of each process in the running process according to the initial priority of each process and the second information of each process includes:
[0013] When the second information of each process includes the size of the memory space occupied, the size of the memory space occupied by each process in the running process is compared with the second memory threshold respectively;
[0014] When the memory space occupied by the process is less than or equal to the second memory threshold, increasing the initial priority of the process to obtain the real-time priority of the process;
[0015] When the memory space occupied by the process is greater than the second memory threshold, the initial priority of the process is reduced to obtain the real-time priority of the process.
[0016] Wherein, in the above-mentioned memory optimization method, determining the real-time priority of each process in the running process according to the initial priority of each process and the second information of each process includes:
[0017] When the second information of each process includes process activity, the process activity of each process in the running process is compared with a preset first activity threshold value;
[0018] When the process activity of the process is less than the first activity threshold, the initial priority of the process is reduced to obtain the real-time priority of the process.
[0019] Wherein, in the above-mentioned memory optimization method, reducing the initial priority of the process to obtain the real-time priority of the process includes:
[0020] sorting all processes whose process activity is less than the first activity threshold in order of process activity from low to high;
[0021] The initial priority of each process is reduced in sequence according to the ranking to obtain the real-time priority of the process, wherein the magnitude of the reduction of the initial priority of each process in the ranking is inversely correlated with the position of the process in the ranking.
[0022] The above memory optimization method further includes:
[0023] When the first information of the running process meets the preset conditions, if it is determined that there is a process in the running process whose process activity is lower than the preset second activity threshold, the process whose process activity is lower than the preset second activity threshold will be closed, wherein the second activity threshold is lower than the first activity threshold.
[0024] According to a second aspect of an embodiment of the present disclosure, a memory optimization device is provided, comprising:
[0025] A first module is configured to determine the real-time priority of each process in the running process when first information of the running process meets a preset condition, wherein the first information of the running process includes at least the size of the memory space occupied by the running process and / or the total number of the running processes;
[0026] The second module is used to close the running processes whose real-time priority is lower than the preset priority threshold;
[0027] The preset conditions include at least one of the following:
[0028] The memory space occupied by the running process reaches or exceeds a preset first memory threshold;
[0029] The total number of running processes reaches or exceeds the preset total number of processes threshold.
[0030] Wherein, in the above-mentioned memory optimization device, the first module includes:
[0031] The priority calculation submodule is used to determine the real-time priority of each process based on the initial priority of each process in the running process and the second information of each process, wherein the initial priority of each process is included in the attribute information of the process, and the second information of each process includes at least the size of the occupied memory space and / or the process activity.
[0032] Among them, in the above-mentioned memory optimization device, the priority calculation submodule includes:
[0033] a first comparison submodule, configured to compare the size of the memory space occupied by each process in the running process with the second memory threshold when the second information of each process includes the size of the occupied memory space;
[0034] a first regulating submodule, configured to increase the initial priority of the process to obtain a real-time priority of the process when the memory space occupied by the process is less than or equal to the second memory threshold;
[0035] The second regulating submodule is configured to reduce the initial priority of the process to obtain the real-time priority of the process when the memory space occupied by the process is greater than the second memory threshold.
[0036] Among them, in the above-mentioned memory optimization device, the priority calculation submodule includes:
[0037] a second comparing submodule, configured to compare the process activity of each process in the running process with a preset first activity threshold value when the second information of each process includes process activity;
[0038] The third regulating submodule is configured to reduce the initial priority of the process to obtain the real-time priority of the process when the process activity of the process is less than the first activity threshold.
[0039] Wherein, in the above-mentioned memory optimization device, the third adjustment submodule includes:
[0040] a sorting submodule, configured to sort all processes whose process activity is less than the first activity threshold in order of process activity from low to high;
[0041] A determination submodule is used to reduce the initial priority of each process in turn according to the sorting to obtain the real-time priority of the process, wherein the magnitude of the reduction of the initial priority of each process in the sorting is inversely correlated with the position of the process in the sorting.
[0042] The memory optimization device further includes:
[0043] The third module is used to close the process whose process activity is lower than a preset second activity threshold when the first information of the running process meets the preset conditions, if it is determined that there is a process in the running process whose process activity is lower than a preset second activity threshold, wherein the second activity threshold is lower than the first activity threshold.
[0044] According to a third aspect of an embodiment of the present disclosure, a memory optimization device is provided, including:
[0045] processor;
[0046] a memory for storing processor-executable instructions;
[0047] Wherein, the processor is configured to:
[0048] When the first information of the running process meets the preset conditions, determining the real-time priority of each process in the running process, wherein the first information of the running process includes at least the size of the memory space occupied by the running process and / or the total number of the running processes;
[0049] Close any running process whose real-time priority is lower than the preset priority threshold;
[0050] The preset conditions include at least one of the following:
[0051] The memory space occupied by the running process reaches or exceeds a preset first memory threshold;
[0052] The total number of running processes reaches or exceeds the preset total number of processes threshold.
[0053] According to a fourth aspect of an embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a terminal device, the terminal device is enabled to perform a memory optimization method, the method comprising:
[0054] When the first information of the running process meets the preset conditions, determining the real-time priority of each process in the running process, wherein the first information of the running process includes at least the size of the memory space occupied by the running process and / or the total number of the running processes;
[0055] Close any running process whose real-time priority is lower than the preset priority threshold;
[0056] The preset conditions include at least one of the following:
[0057] The memory space occupied by the running process reaches or exceeds a preset first memory threshold;
[0058] The total number of running processes reaches or exceeds the preset total number of processes threshold.
[0059] The technical solutions provided by the embodiments of the present disclosure may have the following beneficial effects:
[0060] The technical solution of this embodiment triggers the calculation of the real-time priority of the process through preset conditions, thereby closing some processes according to the real-time priority of the process, which can release the resources occupied by the process in time and reduce the frequency of the terminal device entering the low memory state.
[0061] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0063] Figure 1 The figure is a flowchart of a memory optimization method according to an exemplary embodiment.
[0064] Figure 2 The figure is a flowchart of a memory optimization method according to an exemplary embodiment.
[0065] Figure 3 The figure is a block diagram showing a memory optimization device according to an exemplary embodiment.
[0066] Figure 4 The figure is a block diagram showing a memory optimization device according to an exemplary embodiment. DETAILED DESCRIPTION
[0067] Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. In the following description, when referring to the drawings, like numbers in different figures represent like or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present invention, as detailed in the appended claims.
[0068] In related technologies, when a terminal device enters the lowmem state, it kills processes according to built-in policies. Frequent use of multi-function applications on terminal devices makes it very easy for them to enter the lowmem state. This can cause problems such as screen freezes and excessive battery drain. Furthermore, the lowmemkiller process killing method employed by devices can potentially shut down processes that the user doesn't need, impacting the user experience.
[0069] The present disclosure proposes that before the terminal device enters the lowmem state, some processes can be closed in time according to the real-time situation of the running processes to free up memory space, avoid the terminal device from frequently entering the lowmem state, and thus improve the performance of the terminal device.
[0070] Based on the above ideas, the present disclosure provides a memory optimization method, device and computer storage medium.
[0071] Figure 1 FIG. 1 is a flow chart showing a memory optimization method according to an exemplary embodiment. Figure 1 As shown, the method includes the following operations:
[0072] In step S101, when the first information of the running process meets the preset conditions, the real-time priority of each process in the running process is determined, and the first information of the running process includes at least the size of the memory space occupied by the running process and / or the total number of the running process;
[0073] In step S102, the processes whose real-time priority is lower than the preset priority threshold among the running processes are closed;
[0074] The preconditions include at least one of the following:
[0075] The memory space occupied by the running process reaches or exceeds a preset first memory threshold;
[0076] The total number of running processes reaches or exceeds the preset total number of processes threshold.
[0077] Herein, the first information about running processes includes the memory size occupied by the running processes and / or the total number of running processes. The memory size occupied by a process can reflect the amount of resources currently available to the terminal device, thereby characterizing the current state of the terminal device. Specifically, the smaller the memory size occupied by a process, the more resources currently available to the terminal device, resulting in faster running speed and better performance. Conversely, the larger the memory size occupied by a process, the fewer resources currently available to the terminal device, resulting in slower running speed and poorer performance. The total number of running processes can also reflect the current state of the terminal device. Specifically, the smaller the total number of processes, the fewer software / hardware resources the terminal device occupies, resulting in faster running speed and better performance. Conversely, the larger the total number of processes, the more software / hardware resources the terminal device occupies, resulting in slower running speed and poorer performance. Therefore, the current state of a terminal device can be determined using the first information about running processes.
[0078] In the above step S101, the preset conditions include at least the following: the size of the memory space occupied by the running process reaches or exceeds the preset first memory threshold, and / or the total number of running processes reaches or exceeds the preset total number of processes threshold. Among them, the size of the memory space occupied by the running process reaches or exceeds the preset first memory threshold, which means that the size of the memory space occupied by the running process is too large, and it is considered that the terminal device is at risk of entering a low memory state. The total number of running processes reaches or exceeds the preset total number of processes threshold, which means that there are too many processes currently running, and it is considered that the terminal device is at risk of entering a low memory state.
[0079] In this article, the size of the memory space occupied by the running process reaches or exceeds the preset first memory threshold value, which can be that the sum of the sizes of the memory space occupied by all the processes of the running process reaches or exceeds the preset first memory threshold value. At this time, the first memory threshold value is related to the overall size of the memory space of the terminal device. And in order to avoid the terminal device from frequently entering the low memory state, the first memory threshold value needs to be less than the value of the memory space used by the terminal device in the low memory state. For example, when the terminal device has used 80% of the memory space, the terminal device enters the memory state, and the first memory threshold value in this embodiment is lower than 80%. In this way, when the size of the memory space occupied by the running process reaches the first memory threshold value, that is, when the size of the memory space occupied by the running process does not reach 80% of the memory space, the preset conditions of this embodiment will be met and the subsequent operation will be entered.
[0080] The memory space occupied by a running process reaching or exceeding a preset first memory threshold can also mean that the total memory space occupied by the associated processes within the running process reaches or exceeds the preset first memory threshold. In this case, the first memory threshold is related to the memory space that can be occupied by the associated processes. That is, a corresponding first memory threshold is set for each associated process. For example, for an activated app, the multiple processes triggered by it belong to the same type of associated process. In this case, the first memory threshold can be set separately for the processes associated with different types of apps. For example, for an associated process triggered by a shopping app, the corresponding first memory threshold is set to A. For an associated process triggered by a video app, the corresponding first memory threshold is set to B. Thus, when a user activates a shopping app and triggers multiple associated processes, if the total memory space occupied by these multiple associated processes reaches or exceeds the corresponding first memory threshold A, the preset conditions of this embodiment are considered met, and subsequent operations are performed. When a user activates a video app and triggers multiple associated processes, if the total memory space occupied by these multiple associated processes reaches or exceeds the corresponding first memory threshold B, the preset conditions of this embodiment are considered met, and subsequent operations are performed.
[0081] The memory space occupied by the running processes reaching or exceeding the preset first memory threshold can also mean that the memory space occupied by a single running process reaches or exceeds the preset first memory threshold. In this case, the first memory threshold is related to the memory space that can be occupied by each process. That is, corresponding first memory thresholds are set for different processes. When the memory space occupied by any process reaches or exceeds the corresponding first memory threshold, it is considered that the preset conditions of this embodiment are met, and subsequent operations are performed.
[0082] When the total number of running processes reaches or exceeds the preset total process threshold, the total process threshold is related to the terminal device's ability to support concurrently running processes. Specifically, the higher the terminal device's software / hardware performance, the higher the total process threshold. The lower the terminal device's software / hardware performance, the lower the total process threshold. The preset total process threshold can be determined during initial configuration in the terminal device's operating system or can be set based on user needs.
[0083] The real-time priority of each running process indicates its importance among all running processes in the current state of the terminal device. The more important the process, the higher its corresponding real-time priority. Because the real-time priority indicates the importance of a process, the real-time priority and priority threshold of a process can be used as a reference indicator for whether to shut down the process.
[0084] The priority threshold can be set for all running processes. That is, processes with a real-time priority lower than the threshold are considered low-priority processes and can be closed. This frees up excess memory space occupied by running processes and prevents the terminal device from entering a low-memory state.
[0085] Priority thresholds can also be set for different processes. For example, processes with the same initial priority can be considered to have the same attributes, and the same priority threshold can be set for these processes. In this way, when the real-time priority of a process is lower than its corresponding priority threshold, the process can be considered to be an unimportant process and can be closed. Among them, the priority thresholds corresponding to processes with different initial priorities may be different. In other words, the standards for determining which processes can be closed are different for different processes. In this way, the real-time status of the running process can be better determined based on the attributes of different processes (i.e., the initial priority), and part of the memory space can be reasonably released to prevent the terminal device from repeatedly entering a low-memory state.
[0086] Herein, the preset priority threshold may be determined by an initialization configuration in an operating system of the terminal device, or the priority threshold may be set according to user requirements.
[0087] As can be seen from the above description, when the technical solution of this embodiment determines that the first information of a running process meets the preset conditions, it can be considered that the terminal device is at risk of entering a low-memory state. In this case, by calculating the real-time priority of each running process, some processes can be selectively closed, thereby clearing memory space, preventing the terminal device from frequently entering a low-memory state, and improving terminal device performance.
[0088] This embodiment further provides a memory optimization method, wherein determining the real-time priority of each running process includes:
[0089] The real-time priority of each process is determined based on the initial priority of each process in the running process and the second information of each process, wherein the initial priority of each process is included in the attribute information of the process, and the second information of each process includes at least the size of the occupied memory space and / or the process activity.
[0090] In this document, the real-time priority of each process is determined based on its initial priority and the secondary information of each process. When a preset condition is met (i.e., the terminal device is at risk of entering a low-memory state), the real-time priority of the process needs to be determined to determine whether to shut down the process. The initial priority of a process can represent the importance of each process among all other processes, indirectly indicating its ability to accept shutdown in the event of insufficient memory. The initial priority of each process can be considered a default priority, which is generally static configuration data. For example, the set adj parameter in the process's attribute information can be used to determine the initial priority of a process. However, when selecting processes that can be shut down if the preset conditions are met, simply considering the initial priority of the process is insufficient to reflect the actual importance of each process in the current state. Other factors may also affect the importance of each process.
[0091] For example, each process occupies a different amount of memory, which directly impacts the performance of the terminal device's operating system. Therefore, based on the process's initial priority, the initial priority can be dynamically adjusted in conjunction with the memory size of the process to determine the process's real-time priority. In other words, the real-time priority of each running process can be determined based on its initial priority and the memory size of each process.
[0092] For example, process activity can indicate how frequently a process is operated within a set duration. That is, the more frequently a process is operated within a set duration, the higher its process activity. Higher process activity can indirectly indicate a user's desire to keep the process in the background. Therefore, based on the initial priority of a process, the initial priority can be dynamically adjusted in combination with the process activity to determine the real-time priority of the process. In other words, the real-time priority of each running process can be determined based on its initial priority and its process activity.
[0093] As can be seen, this embodiment introduces multiple factors that affect the priority level when determining the real-time priority of a process, based on the initial priority level, to adjust the initial priority level, thereby obtaining the real-time priority level of the process. In this way, before the terminal device enters a low-memory state, some processes can be selectively closed based on their real-time priority levels, thereby more closely meeting the actual needs of the terminal device and releasing some resources, thus solving the problem of the terminal device frequently entering a low-memory state.
[0094] This embodiment further provides a memory optimization method, wherein the real-time priority of each running process is determined based on the initial priority of each process and the second information of each process, including:
[0095] When the second information of each process includes the size of the memory space occupied, the size of the memory space occupied by each process in the running process is compared with the second memory threshold value;
[0096] When the memory space occupied by the process is less than or equal to the second memory threshold, the initial priority of the process is increased to obtain the real-time priority of the process;
[0097] When the memory space occupied by the process is greater than the second memory threshold, the initial priority of the process is reduced to obtain the real-time priority of the process.
[0098] The second memory threshold can be used as a criterion for determining whether the memory space occupied by a process is excessive. That is, the initial priority of the process can be adjusted based on the comparison result between the memory space occupied by the process and the preset second memory threshold, and the adjusted priority can be determined as the real-time priority of the process.
[0099] When the size of the memory space occupied by a process is less than or equal to the second memory threshold, the size of the memory space occupied by the process can be considered reasonable. At this time, the initial priority of the process can be increased to obtain the real-time priority of the process. In this way, the process can be kept in the background as much as possible, that is, the possibility of the process being selected to be closed is low. Correspondingly, when the size of the memory space occupied by a process is greater than the second memory threshold, it can be considered that the memory space occupied by the process is too large. Therefore, the initial priority of the process can be reduced to obtain the real-time priority of the process. In this way, the possibility of the process being selected to be closed is high, and when the memory occupancy is too much, the process can be closed in time to reasonably release resources and prevent the terminal device from entering a low memory state.
[0100] Herein, the preset second memory threshold may include one or more thresholds. When the preset second memory threshold includes a single threshold, the standard for determining whether a process occupies too much memory is uniform. That is, if the memory occupied by any one or more of all running processes exceeds the threshold, the memory occupied by these one or more processes is considered to be excessive. When the preset second memory threshold includes multiple thresholds, all running processes can be categorized, and each category of processes corresponds to a different second memory threshold. That is, the standard for determining whether the memory occupied by different categories of processes is excessive varies. For example, processes with the same initial priority can be categorized as the same category, and the average memory occupied by processes of the same category can be used as the second memory threshold for processes of that category. When the memory occupied by any process of that category exceeds the corresponding second memory threshold, the process is considered to occupy too much memory. The preset second memory threshold can be determined by the initialization configuration of the terminal device's operating system or set according to user needs.
[0101] As can be seen, this embodiment dynamically adjusts the initial priority of a process based on the memory space occupied by the process to obtain the real-time priority of the process. This approach can more accurately reflect the importance of each process in the current scenario, thereby more accurately determining which processes to close, fundamentally optimizing mobile phone memory management, and promptly detecting and killing processes to free up resources and prevent the terminal device from entering a low-memory state.
[0102] This embodiment further provides a memory optimization method, wherein the real-time priority of each running process is determined based on the initial priority of each process and the second information of each process, including:
[0103] When the second information of each process includes process activity, the process activity of each process in the running process is compared with a preset first activity threshold value;
[0104] When the process activity of the process is less than the first activity threshold, the initial priority of the process is reduced to obtain the real-time priority of the process.
[0105] The first activity threshold can be used as a criterion for determining whether a process is a frequently used process by the user. That is, the initial priority of the process can be adjusted based on the comparison result of the process activity with the preset first activity threshold, and the adjusted priority can be determined as the real-time priority of the process.
[0106] When the process activity of a process is lower than a first activity threshold, the process can be considered as an infrequently used process. In this case, the initial priority of the process can be reduced to obtain the real-time priority of the process. This reduces the likelihood of the process remaining in the background, meaning that the process is more likely to be closed. In the event of excessive memory usage, the process can be closed promptly to properly free up resources and prevent the terminal device from entering a low-memory state.
[0107] In addition, when the process activity is greater than or equal to the activity threshold, the process can be considered as a frequently used process by the user. For frequently used processes, the initial priority can be kept unchanged or dynamically increased according to actual needs, and there is no special restriction on this.
[0108] In this context, the preset activity threshold includes information that reflects the circumstances under which a process is called. For example, the activity threshold may be the minimum number of calls allowed within a set duration. Alternatively, it may be the frequency of calls within a set duration. Alternatively, the activity threshold may be the maximum time interval between two consecutive calls. The preset activity threshold may be determined during initial configuration within the terminal device's operating system or may be set based on user needs.
[0109] As can be seen, this embodiment dynamically adjusts the initial priority of a process based on its activity to obtain its real-time priority. This approach can more accurately reflect the importance of each process in the current scenario, thereby more accurately determining which processes to close, fundamentally optimizing mobile phone memory management, and promptly detecting and killing processes to free up resources and prevent the terminal device from entering a low-memory state.
[0110] This embodiment further provides a memory optimization method, wherein the method reduces the initial priority of a process to obtain the real-time priority of the process, including:
[0111] Sort all processes whose process activity is less than the first activity threshold in order of process activity from low to high;
[0112] The initial priority of each process is reduced in sequence according to the sorting to obtain the real-time priority of the process. Among them, the reduction amplitude of the initial priority of each process in the sorting is inversely correlated with the position of the process in the sorting.
[0113] As described above, processes with process activity below a first activity threshold can be determined as processes that are infrequently used by the user. Since the activity levels of infrequently used processes may vary, the magnitude of the reduction in initial priority for these infrequently used processes may vary. For example, all processes with process activity below the first activity threshold can be sorted in ascending order of process activity, thereby indicating the likelihood of all running processes remaining in the background from low to high. The magnitude of the reduction in initial priority for each process in the sorting is inversely correlated with the position of the process in the sorting. The higher the position of a process in the sorting (i.e., lower activity), the greater the magnitude of the reduction in its initial priority. The lower the position of a process in the sorting (i.e., higher activity), the smaller the magnitude of the reduction in its initial priority.
[0114] It can be seen that in this embodiment, when adjusting the initial priority of processes whose process activity is less than the first activity threshold, these processes are sorted according to their process activity, the adjustment range corresponding to each process is determined, and the initial priority of each process in the above sorting is reduced according to the corresponding adjustment range to obtain the real-time priority of each process. The real-time priority determined in this way can more accurately reflect the real-time demand of the user side for each process in the current scenario, thereby more accurately determining the processes to be closed, fundamentally optimizing the memory management of the mobile phone, timely checking and killing processes, releasing resources, and preventing the terminal device from entering a low-memory state.
[0115] This embodiment also provides a memory optimization method, which further includes:
[0116] When the first information of the running process meets the preset conditions, if it is determined that there is a process in the running process whose process activity is lower than the preset second activity threshold, the process whose process activity is lower than the preset second activity threshold is closed, wherein the second activity threshold is lower than the first activity threshold.
[0117] Among them, the preset second activity threshold can be used as a standard for determining whether a process will be called. That is, a process whose process activity is lower than the preset second activity threshold can be considered as a process that has been inactive for a long time and is unlikely to be used. Therefore, when the first information of the running process meets the preset conditions, that is, when the memory of the terminal device is too much, you can choose to directly close these processes whose process activity is lower than the preset second activity threshold. After closing these processes, you can continue with the subsequent operations in the above embodiment, that is, determine the real-time priority of each process among the surviving processes, and choose to close the processes below the priority threshold.
[0118] As described above, the first activity threshold can be used as a criterion for determining whether a process is frequently used by the user. The comparison between the process activity and the first activity threshold can be used to adjust the process priority. The second activity threshold, on the other hand, serves as a criterion for determining whether a process will be called. The comparison between the process activity and the second activity threshold can be used to directly determine whether the process is closed. Therefore, the second activity threshold needs to be lower than the first activity threshold. The preset second activity threshold can be determined by the initialization configuration of the terminal device's operating system or can be set according to user needs.
[0119] As can be seen, this embodiment uses the comparison result of the process activity with the second activity threshold to directly close the process with low activity, thereby fundamentally optimizing the mobile phone's memory management, timely checking and killing processes, releasing resources, and preventing the terminal device from repeatedly entering a low memory state.
[0120] Figure 2 FIG. 1 is a flow chart showing a memory optimization method according to an exemplary embodiment. Figure 2 As shown, the following operations are included:
[0121] Step S201: Determine whether the memory space occupied by the running processes of the terminal device and / or the total number of running processes meet preset conditions.
[0122] In this embodiment, the preset condition is considered to be met when the size of the memory space occupied by the running process reaches or exceeds a preset first memory threshold.
[0123] When the total number of running processes reaches or exceeds the preset total number of processes threshold, it is also considered that the preset condition is met.
[0124] When the memory space occupied by running processes and / or the total number of running processes meet preset conditions, the terminal device is considered to be at high risk of entering a low-memory state. Therefore, to prevent the terminal device from frequently entering a low-memory state and affecting its normal operation, it is necessary to promptly clear processes to free up some resources.
[0125] Step S202: Determine the real-time priorities of all currently running processes respectively according to a preset method.
[0126] All currently running processes include all currently alive processes.
[0127] In this step, when determining the real-time priority of all currently running processes according to a preset method, the initial priority of the currently running process can be read first, and then the initial priority can be adjusted according to one or more factors including the size of the memory space occupied by the process, the process activity and the total number of processes to obtain the real-time priority.
[0128] For example, the size of the memory space occupied by the process can be compared with the memory threshold corresponding to the initial priority (i.e., the second memory threshold mentioned above), and the initial priority can be adjusted according to the comparison result. When the memory space occupied by the process is less than the memory threshold corresponding to the initial priority, the initial priority of the process can be increased to obtain the real-time priority of the process. When the size of the memory space occupied by the process is greater than or equal to the memory threshold corresponding to the initial priority, the initial priority of the process can be reduced to obtain the real-time priority of the process. Among them, the memory threshold corresponding to the initial priority can be determined based on the average value of the memory space occupied by all processes of the same initial priority.
[0129] For another example, the process activity of a process can be compared with a set first activity threshold, and the initial priority can be adjusted based on the comparison result. When the process activity of a process reaches or exceeds the set first activity threshold, the initial priority of the process can be increased to obtain the real-time priority of the process. When the process activity of a process is lower than the set first activity threshold, the initial priority of the process can be decreased to obtain the real-time priority of the process.
[0130] For another example, when the preset conditions only include that the size of the memory space occupied by the running processes reaches or exceeds the preset first memory threshold, the total number of running processes is not determined. However, the total number of running processes can indicate the current running load of the terminal device, and the current running load may directly affect the priority of all running processes. Therefore, the total number of running processes can be used as a factor to adjust the initial priority of the process, that is, the total number of running processes can be compared with the preset total number of processes threshold, and the initial priority can be adjusted according to the comparison result. When the total number of processes is greater than or equal to the total number of processes threshold, the initial priority of all processes can be reduced to obtain the real-time priority of all processes. When the total number of processes is less than the total number of processes threshold, the initial priority of all processes can be increased to obtain the real-time priority of all processes.
[0131] If the initial priority of a process is adjusted based on two or more of the above factors at the same time, multiple methods can be used to adjust the initial priority of the process.
[0132] For example, the following formula may be used to weight and calculate various factors to obtain the real-time priority of the process.
[0133] Real-time priority = initial priority + α first adjustment range + β second adjustment range + γ third adjustment range.
[0134] Among them, α, β, and γ are the weighting coefficients of each priority factor;
[0135] The first adjustment range is to adjust the priority range based on the size of the memory space occupied by the process;
[0136] The second adjustment range is to adjust the priority range based on the total number of processes;
[0137] The third adjustment range is to adjust the priority range based on the process activity.
[0138] For another example, the initial priority of a process can be adjusted sequentially based on various factors. Specifically, the initial priority of a process can be adjusted based on the amount of memory space occupied by the process to obtain a first dynamic priority. The first dynamic priority can then be adjusted based on the activity of the process to obtain a second dynamic priority. Finally, the second dynamic priority can be adjusted based on the total number of processes. The final adjusted priority can be determined as the real-time priority of the process. The specific methods for adjusting the priority based on various factors can be found in the corresponding content of the previous embodiment and will not be repeated here.
[0139] Step S203: shut down the running processes whose real-time priority is lower than the preset priority threshold.
[0140] The real-time priority calculated in step 202 is compared with a preset priority threshold. If the real-time priority of one or more processes is lower than the priority threshold, these processes may be considered to be low-priority processes. If excessive memory usage occurs, these low-priority processes may be closed to free up some memory space and prevent the system from entering a low-memory state that affects performance.
[0141] In addition, after executing step S201, it is possible to first determine whether there are any processes that have been inactive for a long time among the running processes, that is, processes whose process activity is lower than the second activity threshold (for example, no operation has been performed within 30 minutes), and then directly check and kill them. Then, the operation of step S202 can be entered.
[0142] Figure 3 FIG. 1 is a structural diagram of a memory optimization device according to an exemplary embodiment. Figure 3 As shown, the device includes a first module 31 and a second module 32 .
[0143] The first module 31 is configured to determine the real-time priority of each process in the running process when first information of the running process meets a preset condition, the first information of the running process including at least the size of the memory space occupied by the running process and / or the total number of the running processes;
[0144] The second module 32 is configured to close the running processes whose real-time priority is lower than a preset priority threshold;
[0145] The preconditions include at least one of the following:
[0146] The memory space occupied by the running process reaches or exceeds a preset first memory threshold;
[0147] The total number of running processes reaches or exceeds the preset total number of processes threshold.
[0148] This embodiment further provides a memory optimization device, wherein the first module includes:
[0149] The priority calculation submodule is configured to determine the real-time priority of each process based on the initial priority of each process in the running process and the second information of each process, wherein the initial priority of each process is included in the attribute information of the process, and the second information of each process includes at least the size of the occupied memory space and / or the process activity.
[0150] This embodiment further provides a memory optimization device, wherein the priority calculation submodule includes:
[0151] a first comparison submodule configured to, when the second information of each process includes the size of the occupied memory space, compare the size of the memory space occupied by each process in the running process with the second memory threshold;
[0152] The first adjustment submodule is configured to increase the initial priority of the process to obtain the real-time priority of the process when the memory space occupied by the process is less than or equal to the second memory threshold;
[0153] The second regulating submodule is configured to, when the memory space occupied by the process is greater than a second memory threshold, reduce the initial priority of the process to obtain the real-time priority of the process.
[0154] This embodiment further provides a memory optimization device, wherein the priority calculation submodule includes:
[0155] a second comparing submodule, configured to, when the second information of each process includes process activity, compare the process activity of each process in the running process with a preset first activity threshold;
[0156] The third regulating submodule is configured to, when the process activity of the process is less than the first activity threshold, reduce the initial priority of the process to obtain the real-time priority of the process.
[0157] This embodiment further provides a memory optimization device, wherein the third adjustment submodule includes:
[0158] a sorting submodule configured to sort all processes whose process activity is less than a first activity threshold in order of process activity from low to high;
[0159] The determination submodule is configured to reduce the initial priority of each process in sequence according to the ranking to obtain the real-time priority of the process, wherein the reduction amplitude of the initial priority of each process in the ranking is inversely correlated with the position of the process in the ranking.
[0160] This embodiment further provides a memory optimization device, which further includes:
[0161] The third module is configured to, when the first information of the running process meets the preset conditions, close the process whose process activity is lower than the preset second activity threshold if it is determined that there is a process in the running process whose process activity is lower than the preset second activity threshold, wherein the second activity threshold is lower than the first activity threshold.
[0162] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0163] Figure 4 FIG4 is a block diagram of a memory optimization device 400 according to an exemplary embodiment. For example, the device 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0164] Reference Figure 4 , apparatus 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .
[0165] Processing component 402 generally controls the overall operation of device 400, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. Processing component 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the above-described method. In addition, processing component 402 may include one or more modules to facilitate interaction between processing component 402 and other components. For example, processing component 402 may include a multimedia module to facilitate interaction between multimedia component 408 and processing component 402.
[0166] The memory 404 is configured to store various types of data to support operations on the device 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0167] The power supply component 406 provides power to the various components of the device 400. The power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 400.
[0168] The multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0169] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC) that is configured to receive external audio signals when the device 400 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 404 or transmitted via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.
[0170] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.
[0171] The sensor assembly 414 includes one or more sensors for providing various aspects of the status assessment of the device 400. For example, the sensor assembly 414 can detect the open / closed state of the device 400, the relative positioning of components, such as the display and keypad of the device 400. The sensor assembly 414 can also detect changes in the position of the device 400 or a component of the device 400, the presence or absence of user contact with the device 400, the orientation or acceleration / deceleration of the device 400, and temperature changes of the device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0172] The communication component 416 is configured to facilitate wired or wireless communication between the device 400 and other devices. The device 400 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0173] In an exemplary embodiment, the apparatus 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described method.
[0174] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, which can be executed by the processor 420 of the apparatus 400 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0175] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform a memory optimization method, comprising:
[0176] When the first information of the running process meets the preset condition, determining the real-time priority of each process in the running process, the first information of the running process including at least the size of the memory space occupied by the running process and / or the total number of processes in the running process;
[0177] Close any running process whose real-time priority is lower than the preset priority threshold;
[0178] The preconditions include at least one of the following:
[0179] The memory space occupied by the running process reaches or exceeds a preset first memory threshold;
[0180] The total number of running processes reaches or exceeds the preset total number of processes threshold.
[0181] Other embodiments of the present invention will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the invention being indicated by the following claims.
[0182] It should be understood that the present invention is not limited to the exact construction described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A memory optimization method, applied to a mobile terminal, characterized in that: include: When the first information of the running process meets the preset conditions, determining the real-time priority of each process in the running process, wherein the first information of the running process includes at least the size of the memory space occupied by the running process and / or the total number of the running processes; Shut down any running process whose real-time priority is lower than a preset priority threshold, where different running processes correspond to different priority thresholds; The preset conditions include at least one of the following: The memory space occupied by the running process reaches or exceeds a preset first memory threshold; The total number of running processes reaches or exceeds the preset total number of processes threshold; The size of the memory space occupied by the running process reaches or exceeds a preset first memory threshold, including: the size of the memory space occupied by a single process of the running process reaches or exceeds the preset first memory threshold, wherein the first memory threshold is related to the size of the memory space that can be occupied by each process; Among them, determining the real-time priority of each process in the running process includes: When the total number of running processes is greater than or equal to the preset total number of processes threshold, reducing the initial priorities of all processes to obtain the real-time priorities of all processes; When the total number of running processes is less than the preset total number of processes threshold, increasing the initial priorities of all processes to obtain the real-time priorities of all processes; or Determining the real-time priority of each process according to the initial priority of each process in the running processes and the second information of each process; Determining the real-time priority of each process according to the initial priority of each process in the running process and the second information of each process includes: When the second information of each process includes the size of the occupied memory space, the size of the memory space occupied by each process in the running process is compared with the second memory threshold, wherein the second memory threshold includes multiple thresholds; When the memory space occupied by the process is less than or equal to the second memory threshold, increasing the initial priority of the process to obtain the real-time priority of the process; When the memory space occupied by the process is greater than the second memory threshold, the initial priority of the process is reduced to obtain the real-time priority of the process.
2. The method according to claim 1, characterized in that Determining the real-time priority of each process in the running process includes: The real-time priority of each process is determined according to the initial priority of each process in the running process and the second information of each process, wherein the initial priority of each process is included in the attribute information of the process, and the second information of each process also includes the process activity.
3. The method according to claim 2, characterized in that Determining the real-time priority of each process according to the initial priority of each process in the running process and the second information of each process includes: When the second information of each process includes process activity, the process activity of each process in the running process is compared with a preset first activity threshold value; When the process activity of the process is less than the first activity threshold, the initial priority of the process is reduced to obtain the real-time priority of the process.
4. The method according to claim 3, characterized in that The reducing the initial priority of the process to obtain the real-time priority of the process includes: sorting all processes whose process activity is less than the first activity threshold in order of process activity from low to high; The initial priority of each process is reduced in sequence according to the ranking to obtain the real-time priority of the process, wherein the magnitude of the reduction of the initial priority of each process in the ranking is inversely correlated with the position of the process in the ranking.
5. The method according to claim 3, characterized in that The method further comprises: When the first information of the running process meets the preset conditions, if it is determined that there is a process in the running process whose process activity is lower than the preset second activity threshold, the process whose process activity is lower than the preset second activity threshold will be closed, wherein the second activity threshold is lower than the first activity threshold.
6. A memory optimization device, characterized in that: include: A first module is configured to determine the real-time priority of each process in the running process when first information of the running process meets a preset condition, wherein the first information of the running process includes at least the size of the memory space occupied by the running process and / or the total number of the running processes; The second module is used to close the running processes whose real-time priority is lower than the preset priority threshold, wherein different running processes correspond to different priority thresholds; The preset conditions include at least one of the following: The memory space occupied by the running process reaches or exceeds a preset first memory threshold; The total number of running processes reaches or exceeds the preset total number of processes threshold; The size of the memory space occupied by the running process reaches or exceeds a preset first memory threshold, including: the size of the memory space occupied by a single process of the running process reaches or exceeds the preset first memory threshold, wherein the first memory threshold is related to the size of the memory space that can be occupied by each process; The first module includes: a priority calculation submodule, configured to reduce the initial priorities of all processes to obtain real-time priorities of all processes when the total number of running processes is greater than or equal to the preset total number of processes threshold; When the total number of running processes is less than the preset total number of processes threshold, increasing the initial priorities of all processes to obtain the real-time priorities of all processes; or The priority calculation submodule is used to determine the real-time priority of each process according to the initial priority of each process in the running process and the second information of each process; The priority calculation submodule includes: a first comparison submodule, configured to compare the size of the memory space occupied by each process in the running process with a second memory threshold when the second information of each process includes the size of the occupied memory space, wherein the second memory threshold includes multiple thresholds; a first regulating submodule, configured to increase the initial priority of the process to obtain a real-time priority of the process when the memory space occupied by the process is less than or equal to the second memory threshold; The second regulating submodule is configured to reduce the initial priority of the process to obtain the real-time priority of the process when the memory space occupied by the process is greater than the second memory threshold.
7. The device according to claim 6, characterized in that The priority calculation submodule is used to determine the real-time priority of each process based on the initial priority of each process in the running process and the second information of each process, wherein the initial priority of each process is included in the attribute information of the process, and the second information of each process also includes the process activity.
8. The device according to claim 7, characterized in that The priority calculation submodule includes: a second comparing submodule, configured to compare the process activity of each process in the running process with a preset first activity threshold value when the second information of each process includes process activity; The third regulating submodule is configured to reduce the initial priority of the process to obtain the real-time priority of the process when the process activity of the process is less than the first activity threshold.
9. The device according to claim 8, characterized in that The third regulating submodule includes: a sorting submodule, configured to sort all processes whose process activity is less than the first activity threshold in order of process activity from low to high; A determination submodule is used to reduce the initial priority of each process in turn according to the sorting to obtain the real-time priority of the process, wherein the magnitude of the reduction of the initial priority of each process in the sorting is inversely correlated with the position of the process in the sorting.
10. The device according to claim 8, characterized in that The device further comprises: The third module is used to close the process whose process activity is lower than a preset second activity threshold when the first information of the running process meets the preset conditions, if it is determined that there is a process in the running process whose process activity is lower than a preset second activity threshold, wherein the second activity threshold is lower than the first activity threshold.
11. A memory optimization device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: When the first information of the running process meets the preset conditions, determining the real-time priority of each process in the running process, wherein the first information of the running process includes at least the size of the memory space occupied by the running process and / or the total number of the running processes; Shut down any running process whose real-time priority is lower than a preset priority threshold, where different running processes correspond to different priority thresholds; The preset conditions include at least one of the following: The memory space occupied by the running process reaches or exceeds a preset first memory threshold; The total number of running processes reaches or exceeds the preset total number of processes threshold; The size of the memory space occupied by the running process reaches or exceeds a preset first memory threshold, including: the size of the memory space occupied by a single process of the running process reaches or exceeds the preset first memory threshold, wherein the first memory threshold is related to the size of the memory space that can be occupied by each process; Among them, determining the real-time priority of each process in the running process includes: When the total number of running processes is greater than or equal to the preset total number of processes threshold, reducing the initial priorities of all processes to obtain the real-time priorities of all processes; When the total number of running processes is less than the preset total number of processes threshold, increasing the initial priorities of all processes to obtain the real-time priorities of all processes; or Determining the real-time priority of each process according to the initial priority of each process in the running processes and the second information of each process; Determining the real-time priority of each process according to the initial priority of each process in the running process and the second information of each process includes: When the second information of each process includes the size of the occupied memory space, the size of the memory space occupied by each process in the running process is compared with the second memory threshold, wherein the second memory threshold includes multiple thresholds; When the memory space occupied by the process is less than or equal to the second memory threshold, increasing the initial priority of the process to obtain the real-time priority of the process; When the memory space occupied by the process is greater than the second memory threshold, the initial priority of the process is reduced to obtain the real-time priority of the process.
12. A non-transitory computer-readable storage medium, wherein when instructions in the storage medium are executed by a processor of a terminal device, the terminal device is enabled to perform a memory optimization method, the method comprising: When the first information of the running process meets the preset conditions, determining the real-time priority of each process in the running process, wherein the first information of the running process includes at least the size of the memory space occupied by the running process and / or the total number of the running processes; Shut down any running process whose real-time priority is lower than a preset priority threshold, where different running processes correspond to different priority thresholds; The preset conditions include at least one of the following: The memory space occupied by the running process reaches or exceeds a preset first memory threshold; The total number of running processes reaches or exceeds the preset total number of processes threshold; The size of the memory space occupied by the running process reaches or exceeds a preset first memory threshold, including: the size of the memory space occupied by a single process of the running process reaches or exceeds the preset first memory threshold, wherein the first memory threshold is related to the size of the memory space that can be occupied by each process; Among them, determining the real-time priority of each process in the running process includes: When the total number of running processes is greater than or equal to the preset total number of processes threshold, reducing the initial priorities of all processes to obtain the real-time priorities of all processes; When the total number of running processes is less than the preset total number of processes threshold, increasing the initial priorities of all processes to obtain the real-time priorities of all processes; or Determining the real-time priority of each process according to the initial priority of each process in the running processes and the second information of each process; Determining the real-time priority of each process according to the initial priority of each process in the running process and the second information of each process includes: When the second information of each process includes the size of the occupied memory space, the size of the memory space occupied by each process in the running process is compared with the second memory threshold, wherein the second memory threshold includes multiple thresholds; When the memory space occupied by the process is less than or equal to the second memory threshold, increasing the initial priority of the process to obtain the real-time priority of the process; When the memory space occupied by the process is greater than the second memory threshold, the initial priority of the process is reduced to obtain the real-time priority of the process.
Citation Information
Patent Citations
Process control method and device, storage medium and electronic equipment
CN107463403A
Memory management method, terminal and computer readable storage medium
CN110221921A