Memory crash prevention for computing devices
By monitoring memory usage metrics and predicting future needs, and dynamically downgrading or deactivating application features, the problem of insufficient memory on computing devices is solved, enabling stable operation and performance optimization of applications.
Patent Information
- Application Number
- CN201980091807.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-29
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2039-10-29
AI Technical Summary
When a computing device runs out of memory (OOM), applications may stop running normally or crash. It is difficult to effectively prevent and solve this problem with existing technology.
By monitoring memory usage metrics, predicting future memory needs, downgrading or disabling non-essential application features, dynamically managing memory resources, and utilizing the memory warning system and hierarchical tables to perform memory reduction operations, prevent the occurrence of out-of-memory conditions.
It effectively prevents the out-of-memory state of the computing device, optimizes the performance of the application under low memory conditions, avoids application crashes, and improves the stability and performance of the computing device.
Smart Images

Figure CN113454595B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims the benefit of priority to U.S. Patent Application No. 16 / 220,419, filed on December 14, 2018, the entire contents of which are incorporated herein by reference. Background Art
[0003] An out-of-memory (OOM) event occurs on a computing device when little or no additional memory can be allocated for use by the operating system, applications, or other programs. This situation can cause an application to stop functioning properly or cause the application to crash.
[0004] BRIEF DESCRIPTION OF THE DRAWINGS
[0005] The present disclosure is illustrated by way of example and not limitation in the accompanying drawings in which like reference numerals refer to like elements and in which:
[0006] Figure 1 is a block diagram illustrating an example computing device implementing memory management and crash prevention techniques according to examples described herein;
[0007] Figure 2 An example diagram depicting a hierarchy table of application features according to examples described herein;
[0008] Figure 3 and Figure 4 is a block diagram illustrating an example method of managing memory usage of an application program being executed on a computing device according to examples described herein; and
[0009] Figure 5 is a block diagram illustrating a computing device upon which the examples described herein may be implemented. DETAILED DESCRIPTION
[0010] A computing device may monitor a set of memory usage metrics of the computing device. For example, the computing device may be executing one or more applications that include or display features or perform operations that require significant memory usage. In some examples, based on historical memory usage data and the set of memory usage metrics, an application (referred to herein as the computing device for simplicity) running on the computing device (or the system or operating system of the computing device in another implementation) may determine or predict whether future memory usage will exceed a critical memory threshold. In response to determining that future memory usage will exceed the critical memory threshold, the computing device may downgrade and / or disable one or more application features of the application.
[0011] In various embodiments, an executing application may include a set of features, each of which may be associated with a level of one or more tiers. For example, particular application features may be essential to the operation of the application and may be assigned to the highest tier. The highest tier application features may be exempt from deactivation or suspension, but as described below, may be classified as available for downgrading. In some examples, these highest tier application features may be excluded from downgrading and / or deactivation of a computing device. Other features may be classified into one or more non-essential tiers, making these features available for downgrading and / or deactivation.
[0012] According to the examples described herein, application features can be further divided into subcategories (e.g., as metadata tags for each feature) indicating whether the feature is available for deactivation, downgrade and deactivation, downgrade only (e.g., tier downgrade), neither deactivation nor downgrade. As used herein, "downgrading" an application feature may include reducing the content presentation rate of the feature (e.g., for streaming or updating content), expanding tiles (e.g., reducing the display resolution by a target percentage), reducing the data transfer rate (e.g., increasing the location data update period), etc. As further provided herein, "deactivating" an application feature may include eliminating the feature from current use of the application (or pausing the feature from current use for a period of time) to free up the current memory usage of the feature.
[0013] In various examples, a computing device may include memory monitoring functionality that monitors a set of memory metrics of the computing device. In one aspect, the computing device dynamically monitors current memory usage of an executing application. The computing device may further determine system free memory of the computing device and / or the total amount of memory contained in the computing device. In further embodiments, the computing device may dynamically determine a ratio of total free memory to current memory usage of an executing application. In still further embodiments, the computing device may store historical data indicating historical memory usage of an executing application and monitor current memory usage for a predetermined time period (e.g., memory usage of the application for the last five seconds).
[0014] According to the examples described herein, a computing device may predict future memory usage of an executing application based on the current memory usage of the application for a predetermined period of time and the historical memory usage of the application. For example, a computing device may determine whether an executing application will exceed a critical memory usage threshold within the next thirty seconds. Additionally or alternatively, a computing device may utilize a third-party memory warning system, such as an operating system (OS) integrated memory warning system included in the computing device. Such a third-party warning system may provide a low memory warning that causes the computing device to perform a first set of memory usage reduction operations, such as closing currently unused background applications. In addition, the computing device may record each memory warning from the operating system memory warning system to determine the memory pressure level of the executing application.
[0015] In various examples, a computing device may establish a threshold number of low memory warnings from an OS memory warning system in a given time as a tier memory pressure level for an executing application. For example, three memory warnings within the last minute may include a high memory pressure level, while five memory warnings within the last minute may include a critical memory pressure level. Each memory pressure level may trigger the computing device to perform a corresponding set of memory usage reduction operations for the executing application. For example, when a high memory pressure threshold is met or exceeded, the computing device may begin to downgrade and / or disable a lower-level set of application features (e.g., non-essential features). If the critical memory pressure threshold is met, the computing device may actively downgrade and / or disable additional application features (e.g., higher-level application features) to prevent an out-of-memory (OOM) state of the computing device.
[0016] Additionally or alternatively, the computing device may predict future memory usage based on historical application usage data and application usage over a short period of time (e.g., the previous five seconds), and determine whether the predicted future memory usage will exceed a particular memory pressure level. Thus, a tier memory reduction trigger may be based on the computing device's prediction. For example, based on memory usage predictions from historical data and current usage data, the computing device may predict that a tier three memory pressure level will be exceeded within the next twenty seconds. In response to the prediction, the computing device may preemptively implement memory usage reduction operations to first prevent the tier three memory threshold level from being exceeded. For example, the computing device may look up tier three application features to perform corresponding memory reduction operations on those features, and then preemptively implement the corresponding memory reduction operations.
[0017] In various embodiments, a computing device may monitor memory metrics to dynamically determine whether a first memory pressure threshold is exceeded. If so, the computing device may perform a first level of memory usage reduction operations for an application being executed. The computing device may further determine whether a second, more critical memory pressure threshold is exceeded. If so, the computing device may perform a second level of memory usage reduction operations for an application being executed. It is contemplated that the computing device may establish any number of levels for memory pressure levels, and may further perform memory usage reduction operations corresponding to any number of levels. It is further contemplated that each level of memory pressure level may correspond to a particular level of memory usage reduction operations. In addition, each level of memory usage reduction operations may correspond to a set of application features that may be selectively downgraded or disabled in response to exceeding a corresponding memory pressure level.
[0018] As an example, the executing application may include a navigation application that includes top-level features such as real-time map content, guidance tracks that overlay the map content, updates to the tracks, and the like. Certain features of the top level may be excluded from the downgrade, such as the guidance tracks feature, where map content may be used for downgrade (e.g., reduction in content rendering). The navigation application functionality may also include non-essential functionality, such as voice commands to prepare for upcoming turns and follow guidance tracks, traffic alerts, overlay indicators for refueling or charging stations, restaurants, points of interest, and non-essential buttons or selectable functionality. In one example, the application may also include non-essential, memory-intensive features, such as streaming data or data that is updated nearly continuously (e.g., surge pricing zone indicators for a transport service application used by a transportation provider).
[0019] When the computing device receives a memory warning, it may be that a first level of memory pressure level is exceeded. In response to exceeding the first level of memory pressure level, the computing device may identify a first set of application features of the navigation application, and a set of memory reduction operations performed on the first set of application features. For example, the memory reduction operation for each application feature in the first set of application features may be identified as downgraded or disabled in metadata, and the manner in which the feature is downgraded may be further defined (e.g., reducing the map content rendering rate by 20%).
[0020] Once the first set of memory reduction operations is performed on the executing application, the computing device may continue to monitor memory metrics, and / or monitor warnings issued by the OS memory warning system. If the second level memory pressure threshold is exceeded, the computing device may determine a second set of application features and a set of memory reduction operations to be performed on the second set of application features. It should be noted that the second set of application features may include application features from the first set (e.g., features that have been downgraded). In addition, memory reduction operations for each of the second set of application features may be determined and implemented by the computing device. These operations may include downgrading, further downgrading (e.g., features in the first set and the second set), and deactivation.
[0021] The computing device may continue to monitor the memory metrics to determine if additional memory pressure thresholds are exceeded. Thus, for each of the memory pressure thresholds exceeded, the computing device may look up a corresponding set of application features for the executing application, and a corresponding set of memory reduction operations to be performed on those application features. Thus, for the executing application, each feature may be listed in a database or logical table, each feature may be associated with one or more tiers for memory reduction, and for each listed tier, each feature may be associated with a memory reduction operation (e.g., downgrade, downgrade, or deactivate).
[0022] In one example, the application being executed may include a transport service application used by a transport provider of a network-based transport service for a given area. The transport service application may include various memory-intensive features that require continuous or near-continuous updates. Such features include map content, transport invitation notifications, timers for accepting or rejecting transport invitations, navigation content (e.g., turn-by-turn tracks overlaid with map content), voice turn-by-turn instructions, selectable buttons or menu items, selectable map features (e.g., information content of points of interest), etc. These features may also include a dynamic pricing feature that provides information to the transport provider about map content indicating areas of high demand for transport services. Such a dynamic pricing feature requires near-continuous updates based on supply and demand data for the transport service, and also includes presenting overlay content on the map data (e.g., color-coded shading on sub-areas with high transportation demand, peak pricing multiplier features, etc.).
[0023] In such an example, a computing device may store a tier table that lists each tier of application features for a transport service application. In addition, the table may list a memory pressure level corresponding to each application feature and a corresponding memory reduction operation to be performed when the memory pressure threshold is exceeded. For example, a dynamic pricing feature of a transport service application may be associated with multiple tiers, with each subsequent tier indicating a downgrade operation to be performed and a final tier indicating deactivation of the dynamic pricing feature. When a first memory pressure threshold level is exceeded, the computing device may perform a lookup in the table, identify a dynamic pricing feature in a first set of application features, and determine a memory reduction operation to be performed on the dynamic pricing feature (e.g., reducing a content rendering rate). When an nth tier memory pressure threshold level is exceeded, the computing device may look up in the table a set of application features for the nth tier and the corresponding memory reduction operations to be performed on those application features.
[0024] Among other benefits, examples described herein achieve a technical effect of reactively and / or preemptively addressing low memory or low memory conditions of a computing device by enabling highly granular application feature degradation for a target application executing on the computing device. Such examples may implement predictive capabilities and utilize current low memory warning techniques to optimize the performance of a target application given current or predicted memory conditions.
[0025] As used herein, a computing device refers to a computing device that can provide network connectivity and processing resources to communicate with a system over a network, such as a desktop computer, a cellular computing device and / or a smartphone, a personal digital assistant (PDA), a laptop computer, a virtual reality (VR) or augmented reality (AR) headset, a tablet computer, etc. The computing device may also correspond to custom hardware, an onboard device of an automobile, or an onboard computer, etc. The computing device may also run a designated application that is configured to communicate with a network service.
[0026] One or more examples described herein provide methods, techniques, and actions performed by a computing device to be performed programmatically, or as a computer-implemented method. As used herein, programmatically means by using code or computer-executable instructions. These instructions may be stored in one or more memory resources of a computing device. Steps performed programmatically may or may not be automatic.
[0027] One or more examples described herein can be implemented using programming modules, engines or components. A programmed module, engine or component may include a program, subroutine, a part of a program or a software component or hardware component that can perform one or more of the tasks or functions. As used herein, a module or component may exist on a hardware component independently of other modules or components. Alternatively, a module or component may be a shared element or process of other modules, programs or machines.
[0028] Some of the examples described herein generally require the use of a computing device, including processing and memory resources. For example, one or more of the examples described herein may be implemented in whole or in part on a computing device such as a server, a desktop computer, a cellular or smart phone, a personal digital assistant (e.g., a PDA), a laptop computer, a VR or AR device, a printer, a digital photo frame, a network device (e.g., a router), and a tablet device. Memory, processing, and network resources may be used in conjunction with the establishment, use, or execution of any example described herein (including the execution of any method or the implementation of any system).
[0029] In addition, one or more examples described herein may be implemented by instructions executed by one or more processors. These instructions may be carried on a computer-readable medium. The machines shown or described below in conjunction with the accompanying drawings provide example processing resources and computer-readable media on which instructions for implementing the examples disclosed herein may be carried and / or executed. In particular, the numerous machines shown with the examples of the present invention include processors and various forms of memory for storing data and instructions. Examples of computer-readable media include permanent memory storage devices, such as hard drives on personal computers or servers. Other examples of computer storage media include portable storage units, such as CD or DVD units, flash memory (e.g., carried on smartphones, multi-function devices, or tablets), and magnetic memory. Computers, terminals, network-enabled devices (e.g., mobile devices such as mobile phones) are all example machines and devices that utilize processors, memory, and instructions stored on computer-readable media. In addition, the examples may be implemented in the form of computer programs or computer-usable carrier media capable of carrying such programs.
[0030] System Description
[0031] Figure 1 1 is a block diagram illustrating an example computing device 100 implementing memory management and crash prevention techniques according to examples described herein. The computing device 100 may include a set of sensors 150 (e.g., a positioning system, an IMU, a camera, a microphone, a touch sensor, an ambient light sensor, etc.) and a display 160 that generates a display interface 162 for an executing application 135. The computing device 100 may also include a communication interface 110 that connects the computing device 100 to one or more networks 180. The computing device 100 may also include a memory monitor 120 and an application manager 140. The memory monitor 120 may continuously or periodically monitor a set of memory metrics (e.g., current usage data 132 and / or historical usage data 134) of a memory 130 of the computing device 100.
[0032] The application manager 140 may execute the application 135 in response to input data from the user. The memory 130 may store a set of applications 135. For some of the applications 135, the memory 130 may also store an application feature hierarchy table 136 that lists each application feature in a hierarchical layer corresponding to a memory pressure threshold level. The application feature hierarchy table 136 may include memory usage reduction operation metadata 138 that indicates a memory reduction operation (e.g., no action, downgrade, downgrade level, deactivate) to be performed for each application feature in each hierarchical layer.
[0033] In various embodiments, the memory 130 may collect and store historical memory usage data 134 specific to an executing application 135. For example, the historical usage data 134 may indicate the memory usage of the executing application within a predetermined time period (e.g., thirty seconds) before the current time. In contrast, the current usage data 132 may correspond to a shorter amount of time (e.g., five seconds) before the current time. Based on the historical memory usage data 134 and the current usage data 132 of the executing application, the memory monitor 120 may determine whether the memory usage of the computing device 100 will exceed a critical memory threshold at some point in the future (e.g., after thirty seconds). As provided herein, the critical memory threshold may correspond to an impending out-of-memory crash on the computing device 100.
[0034] The memory monitor 120 may utilize the memory metrics to predict whether a particular memory pressure threshold will be exceeded, and accordingly issue a warning trigger to the application manager 140 - indicating that a current or predicted memory threshold has been exceeded. In various examples, the memory metrics may include the current system free memory of the computing device 100, and the total amount of memory contained in the computing device 100. In further embodiments, the computing device 100 may dynamically determine or otherwise predict a ratio of the total free memory of the computing device 100 to the current memory usage. If the current or predicted ratio exceeds a first threshold (e.g., a first warning triggered by the memory monitor 120), then the application manager 140 may look up a first set of features in the hierarchy table 136 to apply memory reduction operations to those features. If the ratio exceeds a second threshold, then the application manager 140 may perform a second lookup in the hierarchy table 136 for a second set of application features to apply memory reduction operations to those features, and so on up the hierarchy. Therefore, based on the warning trigger level from the memory monitor 120, the application manager 140 can look up a corresponding set of application features in the application feature hierarchy table 136 of the executing application, and then implement a set of memory usage reduction operations displayed in the memory usage reduction operation metadata 138 on these features.
[0035] As described herein, the memory monitor 120 may also utilize the functionality of the OS memory warning system 131 of the computing device 100, which may issue reactive warnings to the memory monitor 120 based on current memory conditions. In some aspects, the memory monitor 120 may utilize these warnings to determine a memory pressure warning level for the executing application 135. In other embodiments, the memory monitor 120 may utilize reactive warnings from the OS warning system 131 to predict that the computing device 100 will exceed a specific memory pressure threshold among a plurality of memory pressure thresholds at some point in the future (e.g., thirty seconds from now). In doing so, the memory monitor 120 may determine the number of reactive memory warnings from the OS memory warning system 131 of the entire computing device 100, the current usage data 132 of the target executing application 135, and the historical usage data 134 for the target executing application 135. Based on these factors, the memory monitor 120 may predict or otherwise determine a memory pressure threshold level among a plurality of memory pressure levels that will be exceeded, and submit a corresponding warning trigger to the application manager 140.
[0036] In response to a warning trigger from the memory monitor 120 indicating that memory usage will exceed a particular memory threshold at some point in the future (e.g., a critical memory threshold indicating an impending crash), the application manager 140 may downgrade one or more application features of the executing application 135. For example, the application manager 140 may perform a lookup in the application feature tier table 136 of the executing application 135 to identify a set of application features for downgrading and / or deactivating (e.g., a set of tier features corresponding to the memory pressure threshold determined by the memory monitor 120). In some embodiments, the tier table 136 may include a list of application features and usage reduction metadata 138 tagged to each feature to indicate which specific memory reduction operation is to be performed for each application feature.
[0037] It is contemplated that application manager 140 may include a component of the executing application 135 itself, or may include a component of an operating system executing on computing device 100. Thus, the functionality of application manager 140 described herein may be configured by the operating system to monitor and manage the memory of any application executing on computing device 100, or may include a component that monitors and manages any individual application executing on the computing device.
[0038] As described herein, the executing applications 135 that the application manager 140 is concerned about degrading may include content streaming (e.g., video or music streaming) applications, mapping and / or navigation applications, social media applications, news content applications, market or sales applications, etc. In some examples, the application manager 140 may include a built-in management program for executing applications 135, enabling program developers to create an application feature hierarchy table 136. Such an arrangement enables program developers to prioritize which features are essential, which features are necessary but may be degraded, and which features are not essential and can be degraded and / or disabled.
[0039] In some aspects, the memory monitor 120 may issue layer warnings to the application manager 140. For example, a first layer of warnings may include lower layer memory usage warnings, and may cause the application manager 140 to downgrade only a first set of non-essential application features, and / or disable certain non-essential functions. A next layer of warnings from the memory monitor 120 may cause the application manager 140 to look up the next layer of application features in the hierarchy table and perform a set of memory reduction operations on those features (e.g., as indicated in the usage reduction metadata 138 for those features in that hierarchy layer). A critical memory warning from the memory monitor 120 (e.g., indicating an impending out-of-memory crash) may cause the application manager 140 to look up a final layer of application features in the hierarchy table 136 and perform a final, most aggressive set of memory usage reduction operations on those features.
[0040] Examples of memory reduction operations may include reducing the resolution of content data to be presented on the display interface 162 of the display screen 160 (e.g., expanding or merging pixels or display blocks). Such operations may also include reducing the content presentation rate of a content stream or mapping content (e.g., from ten frames per second to five frames per second). Additionally or alternatively, memory reduction operations may include reducing the sensor data transmission rate from the sensor 150 (e.g., sending location updates every eight seconds instead of every four seconds), or deactivating certain sensors 150. In some examples, the application manager 140 may also reduce the service data update rate received from the data center of the network 180. For example, under normal memory conditions, the service data may be updated every ten seconds. Such updates may indicate traffic condition updates, supply and demand updates for transport services, news feed updates, etc. When a certain memory pressure threshold is exceeded, the application manager 140 may reduce the service data update rate to, for example, once every thirty seconds.
[0041] It is contemplated that such granular feature management of an application 135 may enable the application to be optimized given current and / or predicted memory conditions of the computing device 100 and prevent low-memory conditions of the computing device 100 that may cause multiple applications to malfunction. For example, memory-intensive applications—such as social media, navigation, and content streaming—may utilize the use of the memory monitor 120 and the application manager 140 to significantly reduce the memory consumption of a target application 135 to alleviate high or critical memory conditions. The application 135 may include built-in application management functionality that may utilize the application feature hierarchy table 136 and reduction metadata 138 described throughout the present disclosure to implement the memory usage reduction techniques described herein.
[0042] Hierarchical Application Characteristics Table
[0043] Figure 2 An example diagram of an application feature hierarchy table 200 is depicted according to examples described herein. Figure 2 In the description of Figure 1 Similar features shown and described are referenced by reference characters. Figure 2 , the hierarchy table 200 may be stored in a database 295 of the computing device 100 and may correspond to Figure 1 In some aspects, the hierarchy table 200 may be associated with a single application of the computing device 100, such as a navigation application, a transport service application, a content streaming application, etc. In some embodiments, as Figure 2 As shown, the tier table 200 may include hierarchical feature layers for multiple device applications 205. For example, when a certain memory pressure threshold is exceeded, any of the listed applications 205 may be executing, or may be running as a background application. In response to the threshold being exceeded, the computing device 100 may identify any of the currently executing applications 205 and look up the various tier application features for that particular application.
[0044] like Figure 2As shown, when a specified memory pressure threshold is exceeded, the executing application (App1) may include a number of application features listed in the feature hierarchy 245 for memory reduction processing. According to the examples described herein, the memory monitor 120 may send a first memory pressure warning trigger 212 to the application manager 140. In response, the application manager 140 may identify first-level application features 210 for memory usage reduction for the executing application (App1) in the feature hierarchy table 200. In some aspects, each of the first-level application features 210 may be associated with a memory reduction operation 215 performed by the application manager 140 (e.g., in metadata).
[0045] refer to Figure 2 , App1 may include first-level features 210, including voice commands, menu lists, map content, GPS data transmission to a remote source, a dynamic pricing feature (e.g., for transmitting service applications), and an advertising update feature. The operation label 215 of each feature may instruct the application manager 140 to perform a specified memory reduction operation on the feature. In the example shown, the memory reduction operations 215 include deactivation of voice commands, reduction of menu lists (e.g., elimination of low priority items), degradation of map content (e.g., by 20%), degradation of GPS data transmission rate (e.g., from once every four seconds to once every eight seconds), degradation of dynamic pricing updates (e.g., by 50%), and degradation of advertising updates (e.g., by 50%).
[0046] In response to the second, more critical memory pressure trigger 222, the application manager 140 may perform a lookup of the second tier application features 220 and perform a corresponding memory reduction operation associated with each second tier application feature 220. Note that some of the first tier application features 210 are also listed in the second tier 220, but are associated with different, more aggressive memory reduction operations. Furthermore, it is contemplated that the application manager 140 need not proceed sequentially down the feature hierarchy 245. Rather, the memory monitor 120 may issue any memory pressure level warning 212, 222 corresponding to any tier of the hierarchy table 200 at any given time, and the application manager 140 may perform each memory reduction operation (e.g., a deactivation action) on any lower tier application feature and then perform the memory reduction operation on the application feature corresponding to the current memory pressure level warning.
[0047] For example, the memory monitor 120 may issue a highly critical third layer memory pressure warning corresponding to the third layer application feature 230 of App1. In response, the application manager 140 may disable voice commands from the first layer 210, then disable advertising updates, menu lists, dynamic pricing features, and point of interest selection features from the second layer 220, and then finally perform memory reduction operations on the third layer application feature 230 (e.g., reduce track lines to 10%, disable content streaming, and reduce map content to 60%). As described herein, Figure 2 As shown, the feature hierarchy 240 may include any number of layers, each corresponding to a particular memory pressure threshold or memory pressure level trigger 212, 22. It is contemplated that such tiered memory reduction processing for a given application can prevent out-of-memory crashes while optimizing the application given the current memory conditions of the computing device 100.
[0048] Methodology
[0049] Figure 3 and 4 is a block diagram illustrating an example method of managing memory usage of applications executing on a computing device according to examples described herein. Figure 3 and Figure 4 In the description of Figure 1 and Figure 2 Reference characters are used for similar features shown and described. Figure 3 and Figure 4 The process described can be Figure 1 The example computing device 100 shown and described may be implemented. Figure 3 , computing device 100 may monitor a set of memory usage metrics of computing device 100 (300). As described herein, the memory usage metrics may include the size of memory currently used by executing applications, the total system free memory of computing device 100, and / or the ratio of system free memory to total system size.
[0050] In various embodiments, the computing device 100 may analyze historical memory usage data 134 of the computing device 100 (305). Specifically, the computing device 100 may analyze historical memory usage data of an executing application (307). In some aspects, the historical data 134 may include a user's previous application usage session, or may include a set amount of time before the current time (e.g., the past N seconds) (309). Based on the set of memory usage metrics and the historical data 134, the computing device 100 may determine or predict whether a critical memory threshold will be exceeded (e.g., within the next twenty seconds) (310). For example, the computing device 100 may use the historical memory usage data 134, the current usage data 132, and the current memory metrics to predict whether a critical memory threshold will be exceeded at some point in the future. It is contemplated that such a determination may include a probability calculation, and "yes" may include a probability above a certain threshold (e.g., 90%), while "no" may be anything below the threshold.
[0051] If the computing device determines that the critical memory threshold will not be exceeded (312), computing device 100 may continue to monitor the set of memory usage metrics (300) accordingly. However, if the computing device determines that the critical memory threshold will be exceeded (314), computing device 100 may downgrade and / or disable certain features of the executing application (315). For example, computing device 100 may reduce the content rendering rate of the application (316), turn off one or more memory intensive features (317), and / or reduce the resolution of the content on display 160 (318).
[0052] Figure 4 is a flowchart describing another example method of managing memory usage of an executing application given current and / or historical memory usage data according to various examples. Figure 4 , computing device 100 may determine system free memory of computing device 100 (400). Computing device 100 may also periodically or continuously determine a ratio of system free memory to total memory of computing device 100 (405). Computing device 100 may monitor the ratio based on a set of hierarchical memory pressure level thresholds (410). In one example, computing device 100 may monitor the ratio of the amount of memory used by executing applications to the system free memory available on computing device 100. Additionally or alternatively, computing device 100 may include an OS memory usage warning system that can be used to predict whether one or more memory pressure thresholds will be exceeded. Based at least in part on the memory usage ratio, computing device 100 may determine or predict whether a first memory pressure threshold will be exceeded at some point in the future (415). If not (417), computing device 100 may continue to monitor the ratio and / or other memory metrics (410) accordingly.
[0053] However, if the prediction is that the first memory pressure threshold will be exceeded (419), the computing device 100 may downgrade and / or disable the first tier application feature group, as described herein (430). The computing device 100 may then continue to monitor the memory metric and / or memory usage ratio (410). The computing device 100 may determine whether the next memory pressure threshold will be exceeded at a future instance (415). If not (417), the computing device 100 may continue to monitor (410). However, if yes (429), the computing device 100 may downgrade and / or disable the next tier of application features (435). The computing device 10 may then continue to monitor (410) accordingly.
[0054] It is contemplated that the loop from process steps (435), (410), and (415) can continue until the threat of an out-of-memory crash is mitigated, or until computing device 100 returns to nominal memory conditions. As described herein, it is also contemplated that memory pressure thresholds need not be exceeded in sequence, but rather predictions can indicate that any memory pressure threshold will be exceeded at a future instance, and memory reduction operations can be performed on all corresponding tiered application features.
[0055] Hardware Diagram
[0056] Figure 5 5 is a block diagram illustrating a computing device on which the examples described herein may be implemented. In various embodiments, the computing device 500 may include a mobile computing device such as a smart phone, a tablet computer, a laptop computer, a VR or AR headset device. Thus, the computing device 500 may include phone features such as a microphone 545, a camera 550, and a communication interface 510 to communicate with external entities using any number of wireless communication protocols. The computing device 500 may also include a positioning module 560 (e.g., a GPS receiver) and an inertial measurement unit 564, which includes one or more accelerometers, gyroscopes, or magnetometers.
[0057] In some aspects, the computing device 500 may store the service application 532 and the application manager 534 in local memory 530. In a variation, the memory 530 may store additional applications executable by one or more processors 540 of the computing device 500 to allow access to and interaction with one or more host servers via one or more networks 580. In some examples, the application manager 534 may include memory monitoring and application management functionality as described throughout this disclosure. In addition, the application manager 534 may be a component of the service application 532 itself, or integrated as a memory management feature of the service application 532. In such an example, the application manager 534 may receive as input the operating system low memory warning system of the computing device 500 and the memory usage metrics (e.g., historical memory usage data and current memory usage data) of the service application 532.
[0058] In variations, application manager 534 may comprise a component of an operating system of computing device 500. Thus, it is contemplated that application manager 534 may be used to monitor all executing applications on computing device 500 and may implement the memory management techniques described herein for each executing application.
[0059] In response to user input 518 by a user (e.g., selecting an icon representing a specified application 532), service application 532 can be executed by processor 540, which can cause generation of display interface 522 on display screen 520 of computing device 500. In various implementations, display interface 522 can enable a user to view and / or interact with displayed content on display interface 522. Additionally, application manager 534 can be initialized based on launching service application 532.
[0060] In various examples, positioning module 560 can provide location data indicating the user's current location to remote computing system 590 (e.g., a server hosting service application 532) to, for example, enable computing system 590 to provide content of service application 532 to display interface 522. In further embodiments, computing device 500 can also transmit additional sensor data to computing system 590, such as image data from camera 550, audio data from microphone 545, and IMU data from IMU 564 (e.g., continuously or periodically).
[0061] The examples described herein are related to implementing the techniques described herein using a computing device 500. According to one example, the techniques are performed by the computing device 500 in response to the processor 540 executing one or more sequences of one or more instructions contained in the main memory 530. Such instructions may be read into the main memory 530 from another machine-readable medium, such as a storage device. Execution of the sequences of instructions contained in the main memory 530 causes the processor 510 to perform the processing steps described herein. In alternative implementations, hard-wired circuitry may be used in place of or in combination with software instructions to implement the examples described herein. Thus, the described examples are not limited to any specific combination of hardware circuitry and software.
[0062] It is contemplated that the examples described herein are independent of other concepts, ideas, or systems and extend to the individual elements and concepts described herein, as well as examples including combinations of elements listed anywhere in this application. Although the examples are described in detail herein with reference to the accompanying drawings, it should be understood that these concepts are not limited to those precise examples. Therefore, many modifications and variations will be apparent to those skilled in the art. Therefore, the scope of these concepts is intended to be defined by the following claims and their equivalents. In addition, it is contemplated that a specific feature described alone or as part of an example can be combined with other features described alone or parts of other examples, even if other features and examples do not mention the specific feature. Therefore, the right to claim protection for a combination that is not described should not be excluded.
Claims
1. A computing device, comprising: Display screen; one or more processors; and one or more memory resources storing instructions that, when executed by the one or more processors, cause the computing device to: monitoring a set of memory usage metrics of the computing device; determining, based on the historical memory usage data and the set of memory usage metrics for an application of the computing device, whether memory usage will exceed a critical memory threshold at some point in the future, wherein the application includes a plurality of priority tiers of application functionality; and In response to determining that the memory usage will exceed the critical memory threshold at some point in the future, a first set of application characteristics of the application is downgraded, the first set of application characteristics corresponding to a lowest priority tier of the plurality of priority tiers.
2. The computing device of claim 1, wherein: The executed instructions further cause the computing device to: displaying the streaming content of the application on the display screen; The executed instructions cause the computing device to downgrade the first set of application features by reducing a content presentation rate of the streaming content.
3. The computing device of claim 1, wherein: The set of memory usage metrics includes a total memory size of the computing device and a currently available memory of the computing device.
4. The computing device of claim 1, wherein: Prior to determining whether memory usage will exceed the critical memory threshold at some point in the future, the executed instructions cause the computing device to collect the historical memory usage data over a predetermined period of time.
5. The computing device of claim 4, wherein: The executed instructions enable the computing device to determine whether the memory usage will exceed the critical memory threshold at a certain time in the future by predicting the historical memory usage data and the current memory usage data within a future period of time.
6. The computing device of claim 1, wherein: The executed instructions further cause the computing device to: while or after downgrading the first set of application features, determining that the memory usage will still exceed the critical memory threshold at some point in the future; and Based on determining that the memory usage will still exceed the critical memory threshold at some point in the future, a second set of application characteristics in a second priority tier in the plurality of priority tiers is downgraded.
7. The computing device of claim 1, wherein: The application includes a driver application for a ride sharing service, and wherein the plurality of priority tiers includes at least one priority tier corresponding to a navigation content feature.
8. A non-transitory computer-readable medium storing instructions that, when executed by one or more processors of a computing device, cause the computing device to: monitoring a set of memory usage metrics of the computing device; determining whether memory usage will exceed a critical memory threshold at some point in the future based on historical memory usage data and the set of memory usage metrics for an application on the computing device, wherein the application includes a plurality of priority tiers of application functionality; and In response to determining that the memory usage will exceed the critical memory threshold at some point in the future, a first set of application characteristics of the application is downgraded, the first set of application characteristics corresponding to a lowest priority tier of the plurality of priority tiers.
9. The non-transitory computer readable medium of claim 8, wherein: The executed instructions further cause the computing device to: displaying the streaming content of the application on a display screen; The executed instructions cause the computing device to downgrade the first set of application features by reducing a content presentation rate of the streaming content.
10. The non-transitory computer readable medium of claim 8, wherein: The set of memory usage metrics includes a total memory size of the computing device and a currently available memory of the computing device.
11. The non-transitory computer readable medium of claim 8, wherein: Prior to determining whether memory usage will exceed the critical memory threshold at some point in the future, the executed instructions cause the computing device to collect the historical memory usage data over a predetermined period of time.
12. The non-transitory computer readable medium of claim 11, wherein: The executed instructions enable the computing device to determine whether the memory usage will exceed the critical memory threshold at a certain time in the future by predicting the historical memory usage data and the current memory usage data within a future period of time.
13. The non-transitory computer readable medium of claim 10, wherein: The executed instructions further cause the computing device to: while or after downgrading the first set of application features, determining that the memory usage will still exceed the critical memory threshold at some point in the future; and Based on determining that the memory usage will still exceed the critical memory threshold at some point in the future, a second set of application characteristics in a second priority tier in the plurality of priority tiers is downgraded.
14. A computer-implemented method of operating a computing device, the method being executed by one or more processors of the computing device and comprising: monitoring a set of memory usage metrics of a computing device; determining, based on historical memory usage data and the set of memory usage metrics for an application on the computing device, whether memory usage will exceed a critical memory threshold at some point in the future, wherein the application includes a plurality of priority tiers of application functionality; and In response to determining that the memory usage will exceed the critical memory threshold at some point in the future, a first set of application characteristics of the application is downgraded, the first set of application characteristics corresponding to a lowest priority tier of the plurality of priority tiers.
15. The method of claim 14, further comprising: displaying the streaming content of the application on a display screen; wherein the one or more processors degrade the first set of application features by reducing a content presentation rate of the streaming content.
16. The method of claim 14, wherein: The set of memory usage metrics includes a total memory size of the computing device and a currently available memory of the computing device.
17. The method of claim 14, wherein: The one or more processors collect the historical memory usage data over a predetermined period of time before determining whether the memory usage will exceed the critical memory threshold at a future time.
18. The method of claim 17, wherein: The one or more processors determine whether the memory usage will exceed the critical memory threshold at the future time by predicting the historical memory usage data and the current memory usage data in a future time period.
19. The method of claim 14, further comprising: while or after downgrading the first set of application features, determining that the memory usage will still exceed the critical memory threshold at some point in the future; and Based on determining that the memory usage will still exceed the critical memory threshold at some point in the future, a second set of application characteristics in a second priority tier in the plurality of priority tiers is downgraded.
20. The method according to claim 14, wherein: The application includes a driver application for a ride sharing service, and wherein the plurality of priority tiers includes at least one priority tier corresponding to a navigation content feature.
Citation Information
Patent Citations
Memory crash prevention for a computing device
US10977105B2
Active-detecting high-availability software operating method in cloud platform
CN103577306A
Monitoring application program resource consumption
CN103959745A
