Application operation method, device and storage medium

By capturing memory space application failure events and releasing cached data of preset functional components, the problem of application failure caused by insufficient free memory on the client device is solved, and the normal operation and robustness of the application under low memory conditions are improved.

CN111638956BActive Publication Date: 2024-08-27TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202010465670.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-28
Publication Date
2024-08-27
Estimated Expiration
2040-08-27

AI Technical Summary

Technical Problem

When there is insufficient free memory space on the client device, the application cannot run properly, resulting in low operational robustness.

Method used

By capturing the event of memory space application failure, the requested space amount of the target functional component is obtained, and the preset functional component is instructed to release the space occupied by its cached data, and sufficient space to be allocated is obtained, and allocated to the target functional component to realize its operation.

Benefits of technology

Even when there is insufficient free memory space, the memory space occupied by the cache data of other functional components is used to ensure that the application can run normally and improve the operational robustness of the application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111638956B
    Figure CN111638956B
Patent Text Reader

Abstract

The embodiment of the present invention provides an application operation method, device and storage medium; the method includes: responding to a space allocation failure event, obtaining the requested space amount requested by the target functional component; the space allocation failure event refers to an event in which the space application fails due to insufficient free memory space, and the target functional component is any functional component in the application; instructing the preset functional component of the application to release the space occupied by the cache data of the preset functional component to obtain a to-be-allocated space whose space amount is greater than or equal to the requested space amount; allocating the to-be-allocated space to the target functional component, so that the target functional component uses the to-be-allocated space to realize the operation of the target functional component. Through the embodiment of the present invention, the robustness of the application operation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to information processing technology in the field of computer applications, and in particular to an application running method, device and storage medium. Background Art

[0002] Currently, there are various applications in client devices, such as APP (Application); when running the application to implement corresponding functions, the processor and memory system in the client device frequently interact with data to implement the corresponding functions of the application; therefore, the operation of the application requires the support of memory space.

[0003] Generally speaking, when applying for memory space to run an application, if there is sufficient free memory space in the client device, the application can run normally; however, if there is insufficient free memory space in the client device, the application cannot run normally. Therefore, the robustness of the application operation is low. Summary of the invention

[0004] The embodiments of the present invention provide an application running method, a device and a storage medium, which can improve the robustness of application running.

[0005] The technical solution of the embodiment of the present invention is achieved as follows:

[0006] An embodiment of the present invention provides a method for running an application, including:

[0007] In response to a space allocation failure event, obtaining a requested space amount requested by a target functional component; the space allocation failure event refers to an event in which a space application fails due to insufficient free memory space, and the target functional component is any functional component in the application;

[0008] Instructing a preset functional component of the application to release the space occupied by cache data of the preset functional component to obtain a to-be-allocated space whose amount is greater than or equal to the requested amount of space;

[0009] The space to be allocated is allocated to the target functional component, so that the target functional component uses the space to be allocated to realize the operation of the target functional component.

[0010] An embodiment of the present invention provides an application running device, including:

[0011] An event response module, used to respond to a space allocation failure event and obtain the requested space amount requested by the target functional component; the space allocation failure event refers to an event in which the space application fails due to insufficient free memory space, and the target functional component is any functional component in the application;

[0012] A space release module, used to instruct a preset functional component of the application to release the space occupied by cache data of the preset functional component, and obtain a to-be-allocated space whose amount of space is greater than or equal to the requested amount of space;

[0013] The space allocation module is used to allocate the space to be allocated to the target functional component, so that the target functional component uses the space to be allocated to realize the operation of the target functional component.

[0014] An embodiment of the present invention provides an application running device, including:

[0015] A memory for storing executable instructions;

[0016] The processor is used to implement the application running method provided by the embodiment of the present invention when executing the executable instructions stored in the memory.

[0017] An embodiment of the present invention provides a computer-readable storage medium storing executable instructions for causing a processor to execute the instructions to implement an application running method provided by the embodiment of the present invention.

[0018] The embodiments of the present invention have the following beneficial effects: by capturing the event of failed memory space application and instructing the preset functional component to release the space occupied by the cached data of the preset functional component according to the amount of space requested by the event, the target functional component can apply for enough space to realize the operation of the target functional component, thereby realizing the operation of the application; that is, even when the free memory space is insufficient and the application cannot run, the normal operation of the application can be realized by misappropriating the memory space occupied by the cached data of other functional components; therefore, the robustness of the application operation can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A schematic diagram showing an exemplary running application;

[0020] Figure 2 A schematic diagram of an exemplary process of applying for memory space is shown;

[0021] Figure 3 This is an optional schematic diagram of the architecture of the application running system provided by the embodiment of the present invention;

[0022] Figure 4 is a schematic diagram of the structure of a terminal provided by an embodiment of the present invention;

[0023] Figure 5 This is an optional flowchart of the method for running an application provided by an embodiment of the present invention;

[0024] Figure 6is another optional flowchart of the method for running an application provided by an embodiment of the present invention;

[0025] Figure 7 is another optional architecture diagram of the application running system provided by an embodiment of the present invention;

[0026] Figure 8 is a schematic diagram of an exemplary application for memory space provided by an embodiment of the present invention;

[0027] Fig. 9 is a schematic diagram of an exemplary memory space application process provided by an embodiment of the present invention;

[0028] Fig.10 It is a schematic diagram of an exemplary process for implementing application operation provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present invention. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.

[0030] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0031] In the following description, the terms "first\second" are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present invention described herein can be implemented in an order other than that illustrated or described herein.

[0032] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present invention have the same meanings as those commonly understood by those skilled in the art of the present invention. The terms used in the embodiments of the present invention are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.

[0033] Before further describing the embodiments of the present invention in detail, the nouns and terms involved in the embodiments of the present invention are described. The nouns and terms involved in the embodiments of the present invention are subject to the following interpretations.

[0034] 1) Memory system, corresponding to the internal memory, is also called main memory. Its corresponding storage space is the storage space that the processor can directly address, so it is a bridge for communication between external memory and processor. It is used to temporarily store the calculation data in the processor and the data exchanged with external storage such as hard disk to support the operation of all applications in the computer.

[0035] 2) Component: refers to the module or unit used to implement the functions in the application, also known as functional component.

[0036] 3) Cloud Technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing.

[0037] 4) Blockchain is an encrypted, chained transaction storage structure formed by blocks.

[0038] 5) Blockchain Network: A collection of nodes that incorporate new blocks into the blockchain through consensus.

[0039] Generally speaking, the running of an application is achieved by each functional component in the application applying for space from the memory system. Figure 1 , Figure 1 A schematic diagram of an exemplary running application is shown; Figure 1 As shown, when application 1-1 (e.g., APP, management system, etc.) is running in the mobile phone, each functional component included in application 1-1 (data cache component 1-11, other components 1-12, log component 1-13 and network component 1-14, etc.) applies for memory space from memory system 1-2 respectively to perform corresponding processing to support the normal operation of application 1-1 on the mobile phone.

[0040] However, if any functional component in the application requests space from the memory system and fails due to insufficient free memory in the memory system, the application will be unable to run and crash, and will not be able to run normally. Figure 2 , Figure 2 An exemplary process diagram of applying for memory space is shown; Figure 2 As shown:

[0041] S201, start; that is, start to execute the application of memory space.

[0042] S202, the functional component applies for memory space from the memory system; that is, any functional component of the application applies for memory space from the memory system.

[0043] S203, determine whether the memory space application is successful; if yes, execute S204; if not, execute S205.

[0044] S204, yes; that is, the free memory space of the memory system is sufficient, and the application is successful; at this time, the application runs normally, and S207 is executed to end the memory space application process.

[0045] S205: No; that is, the free memory space of the memory system is insufficient and the application fails; at this time, execute S206.

[0046] S206, the application cannot run; that is, the application cannot run and causes a crash, and S207 is executed to end the memory space application process.

[0047] S207, end; that is, end the memory space application process.

[0048] Based on the above process, it can be seen that the application operation has low stability and poor robustness.

[0049] Based on this, embodiments of the present invention provide an application running method, apparatus, device and storage medium, which can improve the stability and robustness of application running.

[0050] The following describes an exemplary application of an application running device (hereinafter referred to as a running device) provided by an embodiment of the present invention. The running device provided by an embodiment of the present invention can be implemented as various types of user terminals such as smart phones, tablet computers, and laptop computers, and can also be implemented as a server. Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. The following describes an exemplary application when the running device is implemented as a terminal.

[0051] It should be noted that the embodiments of the present invention can also be implemented in combination with blockchain technology. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods, each of which contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer. For the operating method of the application combined with blockchain technology provided in the embodiment of the present invention, please refer to the subsequent description.

[0052] It should also be noted that the application running method provided in the embodiment of the present invention can be applied to the memory space allocation of applications in any application scenario; for example, it can be applied to the memory space allocation of applications in a cloud platform to improve the stability and robustness of the application running in the cloud platform, thereby improving the quality of cloud services.

[0053] It should be noted that cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as a storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of storage devices of various types (storage devices are also called storage nodes) in the network to work together through application software or application interfaces to provide data storage and business access functions. At present, the storage method of the storage system is to create a logical volume. When creating a logical volume, a physical storage space is allocated to each logical volume. The physical storage space may be composed of disks of a storage device or several storage devices. The client stores data on a logical volume, that is, the data is stored on the file system. The file system divides the data into many parts, each of which is an object. The object contains not only data but also additional information such as data identification (ID, Identity). The file system writes each object into the physical storage space of the logical volume, and the file system records the storage location information of each object. Therefore, when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object. The process of the storage system allocating physical storage space to a logical volume is as follows: based on the estimated capacity of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of independent redundant disk arrays (RAID, Redundant Array of Independent Disks), the physical storage space is pre-divided into stripes. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.

[0054] See also Figure 3 , Figure 3 This is an optional architecture diagram of the application operation system provided by an embodiment of the present invention. To support the operation of an application, in the application operation system 100, the terminal 400 (operation device) is connected to the application server 200 via the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two. Among them, the terminal 400 includes various functional components, any functional component among the various functional components is the target functional component 401, and some components among the various functional components included in the terminal 400 are the preset functional components 403. In addition, the terminal 400 also includes a memory pool component 402 and a memory system 404.

[0055] The application server 200 is used to provide service data of application operation to the terminal 400 through the network 300 .

[0056] The terminal 400 is used to request service data for running the application from the application server 200 through the network 300. It is also used to respond to a space allocation failure event when the target functional component 401 applies for space from the memory system 404 through the memory pool component 402, and obtain the requested space amount requested by the target functional component 401; the space allocation failure event refers to an event in which the space application fails due to insufficient free memory space; instruct the preset functional component 403 of the application to release the space occupied by the cache data of the preset functional component 403 (i.e., release the space) to obtain the to-be-allocated space whose space amount is greater than or equal to the requested space amount; and allocate the to-be-allocated space to the target functional component 401, so that the target functional component 401 uses the to-be-allocated space to realize the operation of the target functional component 401, thereby realizing the operation of the application at the terminal 400.

[0057] See also Figure 4 , Figure 4 is a schematic diagram of the structure of a terminal provided by an embodiment of the present invention, Figure 4 The terminal 400 shown includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the terminal 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not shown in FIG. Figure 4 Various buses are labeled as bus system 440 .

[0058] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0059] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0060] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiment of the present invention is intended to include any suitable type of memory. The memory 450 optionally includes one or more storage devices that are physically far away from the processor 410.

[0061] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0062] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0063] A network communication module 452, for reaching other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Fidelity (Wi-Fi), and Universal Serial Bus (USB);

[0064] a display module 453 for enabling presentation of information via one or more output devices 431 (e.g., display screens, speakers, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);

[0065] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.

[0066] In some embodiments, the application running device provided by the embodiments of the present invention (hereinafter referred to as the running device) can be implemented in a software manner. Figure 4 An operating device 455 stored in the memory 450 is shown, which can be software in the form of programs and plug-ins, etc., including the following software modules: an event response module 4551, a space release module 4552, a space allocation module 4553, a setting module 4554 and an event acquisition module 4555. The functions of each module will be explained below.

[0067] In other embodiments, the operating device provided by the embodiment of the present invention can be implemented in hardware. As an example, the operating device provided by the embodiment of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the operating method of the application provided by the embodiment of the present invention. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs) or other electronic components.

[0068] Next, the method for running the application provided by the embodiment of the present invention will be described in conjunction with an exemplary application and implementation of the terminal provided by the embodiment of the present invention.

[0069] See also Figure 5 , Figure 5 is an optional flow chart of the method for running an application provided by an embodiment of the present invention, which will be combined with Figure 5 The steps shown are explained.

[0070] S501. In response to a space allocation failure event, obtain the requested space amount requested by the target functional component.

[0071] In the embodiment of the present invention, when the terminal starts an application or implements a new function during the operation of the application, it is accompanied by the application of memory space. If the current free memory space is insufficient, the application of memory space will fail; thus, the terminal obtains the event of the failure of the application of memory space, and also obtains the event of the failure of space allocation. At this time, the terminal responds to the space allocation identification event, obtains the functional component that applies for memory space in the application, and obtains the target functional component; and obtains the space amount of the memory space applied by the target functional component, and also obtains the requested space amount requested by the target functional component.

[0072] Here, when the terminal obtains the requested space amount requested by the target functional component, it can obtain the corresponding space application information based on the space allocation failure event, so as to obtain the requested space amount requested by the target functional component based on the space application information; it can also directly obtain the requested space amount requested by the target functional component from the space allocation failure event; and so on. The embodiment of the present invention does not make specific limitations on this.

[0073] It should be noted that the space allocation failure event refers to an event in which the space application fails due to insufficient free memory space; the target functional component is any functional component in the application, such as a log component, a network component, a data cache component or other components.

[0074] S502: Instruct a preset functional component of the application to release the space occupied by cached data of the preset functional component to obtain a to-be-allocated space whose amount is greater than or equal to the requested amount of space.

[0075] In an embodiment of the present invention, a preset function component is provided in the terminal, which is used to release the memory space occupied by cached data when the free memory space is insufficient, so as to provide the target function component with an application, such as a data cache component or a log component; therefore, after the terminal obtains the requested space amount, in order to enable the target function component to apply for sufficient memory space when the free memory space is insufficient, the preset function component is instructed to release the space occupied by the cached data of the preset function component, so that the target function component can obtain sufficient memory space through the released space; thus, through the release of the space, the terminal also obtains the to-be-allocated space whose space amount is greater than or equal to the requested space chain. Here, the released memory space is released according to the requested space amount; that is, as long as the requested space amount can be met after the space release is completed.

[0076] It should be noted that the cache data corresponding to the preset functional component includes auxiliary data for application operation, such as video cache information for replaying videos, or image cache information in interactive records, etc. Therefore, the preset functional component releases the memory space occupied by these auxiliary data without affecting the normal operation of the application, that is, these auxiliary data are not sufficient and necessary data for running the application, and even if these auxiliary data are not used, the application will not crash due to inability to run. In addition, the space to be allocated is the memory space requested by the target functional component.

[0077] S503: Allocate the space to be allocated to the target functional component, so that the target functional component uses the space to be allocated to implement the operation of the target functional component.

[0078] In the embodiment of the present invention, since the space to be allocated refers to the space used to be allocated to the target functional component, after the terminal obtains the space to be allocated, it allocates the space to be allocated to the target functional component; in this way, after the target functional component obtains the space to be allocated, it also obtains sufficient memory space, so that it can perform corresponding functional processing, and the application can run normally.

[0079] It can be understood that when running an application, by capturing the event of failed memory space application and instructing the preset functional component to release space according to the amount of space requested by the event, the target functional component can apply for sufficient memory space to support the operation of the application. Therefore, even if the application cannot run due to insufficient free memory space, the normal operation of the application can be achieved by misappropriating the memory space occupied by the cache data corresponding to other functional components. Therefore, the robustness of the application operation can be improved.

[0080] In the embodiment of the present invention, the application further includes a memory pool component, which is used to control the allocation of free memory space of the application; that is, the memory pool component is a functional component in the application, which is used to control the allocation of memory space of each functional component in the application. Therefore, the above S501-S503 are all implemented by the memory pool component; that is, S501-S503 can be implemented by S5011, S5021 and S5031, wherein:

[0081] S5011. The memory pool component responds to the space allocation failure event and obtains the requested space amount requested by the target functional component.

[0082] S5021. The memory pool component instructs the preset functional component to release the space occupied by the cached data of the preset functional component to obtain a to-be-allocated space whose amount is greater than or equal to the requested amount of space.

[0083] S5031. The memory pool component allocates the space to be allocated to the target functional component.

[0084] It can be understood that by adding a memory pool component to the application for managing the application's own memory space allocation, the allocation of memory space for preset functional components is made more flexible, and the allocation of memory space for preset functional components and the allocation of memory space in the entire application are connected in series, which effectively ensures the normal operation of the application and improves robustness.

[0085] In the embodiment of the present invention, S504 and S505 are included before S501; that is, before the terminal responds to the space allocation failure event and obtains the requested space amount requested by the target functional component, the application operation method also includes S504 and S505. Each step is explained below.

[0086] S504: Acquire various functional components of the application to obtain a functional component set.

[0087] In the embodiment of the present invention, the application includes various functional components, and the terminal obtains the various functional components in the application, thereby obtaining a functional component set composed of the various functional components of the application. Here, the functional component set does not include a memory pool component.

[0088] S505: Select a functional component that meets a preset selection condition from the functional component set, and use the selected functional component as a preset functional component.

[0089] In the embodiment of the present invention, a preset selection condition is pre-set in the terminal, or the terminal can obtain the preset selection condition, and the preset selection condition is used to select a functional component from the functional component set as a preset functional component; therefore, after obtaining the functional component set, the terminal selects a functional component that meets the preset selection condition from the functional component set, and thus obtains the preset functional component. It is easy to know that the preset functional component includes at least one functional component.

[0090] It should be noted that the preset selection conditions include at least one of the cached data volume, data type and component function. Among them, the cached data volume refers to the data volume of the data cached by the functional component, which is used as the preset data volume threshold; thus, for the functional component with a large data volume of cached data (greater than the preset data volume threshold), the functional component is the functional component that meets the preset selection conditions. The data type refers to the type of data cached by the functional component, such as the playback data type, the pre-cached data type, etc.; thus, the type of cached data in the functional component belongs to the data type, and the functional component is the functional component that meets the preset selection conditions. The component function refers to the function corresponding to the functional component, such as caching playback data, storing logs, etc.; thus, the type of the function corresponding to the functional component belongs to the function type, and the functional component is the functional component that meets the preset selection conditions.

[0091] It can be understood that the terminal sets a preset functional component to release memory space when memory application fails; when any functional component in the application applies for memory space and fails due to insufficient free memory space, the memory space is released through the preset functional component, so that the functional component that applies for memory space can apply for sufficient memory space, thereby enabling the application to run normally, thereby improving the robustness of the application operation.

[0092] In an embodiment of the present invention, S5021 can be implemented through S50211-S50213; that is, the terminal instructs the preset functional component through the memory pool component to release the space occupied by the cached data of the preset functional component, and obtains the to-be-allocated space with an amount of space greater than or equal to the requested amount of space, including S50211-S50213, and each step is described below.

[0093] S50211. Use the free memory space corresponding to the memory pool component as the first free space.

[0094] It should be noted that when the preset functional component releases space, the amount of memory space released is determined by the corresponding free memory space in the memory pool component; therefore, the terminal needs to obtain the free memory space corresponding to the memory pool component; here, the obtained free space corresponding to the memory pool component is the first free space.

[0095] S50212. The memory pool component instructs the preset functional component to release the space occupied by the cached data of the preset functional component until the amount of continuous space composed of the released space and the first free space is not less than the requested space amount, and then stops releasing to obtain the target released space.

[0096] It should be noted that the allocation of memory space refers to the allocation of continuous space; and the preset functional component includes at least one functional component, so when the preset functional component releases space, it can be one functional component or multiple functional components, as long as the space amount of the corresponding continuous space after the released memory space is merged with the first free space can meet the application of the requested space amount. Here, the target released space refers to the memory space released by the preset functional component.

[0097] S50213: Determine, from a continuous space consisting of the target released space and the first free space, a to-be-allocated space whose space amount is greater than or equal to the requested space amount.

[0098] In an embodiment of the present invention, when the preset functional component completes the release of the target released space, the free memory space is the target released space and the first free space; thus, the terminal determines the continuous space in the free space composed of the target released space and the first free space, whose space amount is greater than or equal to the requested space amount, as the space to be allocated; that is, the space to be allocated is the continuous memory space in the combined space of the target released space and the first free space, whose space amount is greater than or equal to the requested space amount.

[0099] In an embodiment of the present invention, S50213 can be implemented through S502131 and S502132; that is, the terminal determines the to-be-allocated space whose amount of space is greater than or equal to the requested amount of space from the continuous space composed of the target released space and the first free space, including S502131 and S502132. This step is explained below.

[0100] S502131, Memory pool component cache target frees up space.

[0101] In the embodiment of the present invention, in order to enable the target released space released by the preset functional component to be applied for by the application, here, the terminal caches the target released space through the memory pool component.

[0102] S502132: Determine a to-be-allocated space whose space amount is greater than or equal to the requested space amount from a continuous space consisting of the target released space of the cache and the first free space.

[0103] It should be noted that when the preset functional component completes the release of space and the released target released space is cached by the memory pool component, the free memory space corresponding to the memory pool component is the target released space and the first free space; therefore, when allocating memory space to the target functional component, it is determined from the target released space and the first free space cached by the memory pool component.

[0104] It is understandable that the memory space released by the preset functional component is cached by the memory pool component, so that it can be guaranteed that the released memory space can be applied for by the target functional component, thereby providing an effective guarantee for the stable operation of the application.

[0105] See also Figure 6 , Figure 6 is another optional flow chart of the method for running an application provided in an embodiment of the present invention; Figure 6 As shown, the operating method of the application provided by the embodiment of the present invention includes S5011, S5021 and S5031, and before S5011, it also includes S601-S603; that is, before the terminal responds to the space allocation failure event through the memory pool component and obtains the requested space amount requested by the target functional component, the operating method of the application also includes S601-S603, and each step is explained below.

[0106] S601. The memory pool component obtains a space application request sent by a target functional component; the space application request includes a requested space amount.

[0107] In the embodiment of the present invention, since the memory pool component is used to control the allocation of memory space in the application, when the target functional component in the application applies for memory space, the memory pool component also receives the space application request sent by the target functional component. It is easy to know that the space application request refers to the request of the target functional component to apply for memory space, and the space application request includes the requested space amount.

[0108] S602: When the space amount corresponding to the continuous space in the first free space is less than the requested space amount, the memory pool component applies for space from the memory system.

[0109] In an embodiment of the present invention, since the currently free memory space in the memory pool component is the first free space, after the terminal obtains the requested space amount, it compares the requested space amount with the space amount corresponding to the continuous space in the first free space; when the space amount corresponding to the continuous space in the first free space is less than the requested space amount, it indicates that the free memory space in the memory pool component is insufficient for allocation, and the successful allocation of the memory space requested by the application cannot be achieved; at this time, the terminal applies for memory space from the memory system through the memory pool component.

[0110] S603: The memory pool component obtains a space allocation failure event sent by the memory system.

[0111] In an embodiment of the present invention, when applying for space from a memory system through a memory pool component, the free memory space in the memory system is used as the second free space, and then the amount of space corresponding to the continuous space in the second free space is compared with the requested amount of space. When the amount of space corresponding to the continuous space in the second free space is less than the requested amount of space, it indicates that the free memory space in the memory system is also insufficient; at this time, a space allocation failure event is generated. Here, when the memory system sends the space allocation failure event to the memory pool component, the terminal obtains the space allocation failure event sent by the memory system through the memory pool component.

[0112] It should be noted that the space allocation failure event is generated when the space amount corresponding to the continuous space in the second free space of the memory system is less than the requested space amount, and the second free space is the free memory space of the memory system.

[0113] Continue to see Figure 6 In the embodiment of the present invention, S601 further includes S604 and S605; that is, after the terminal obtains the space application request sent by the target functional component through the memory pool component, the running method of the application further includes:

[0114] S604: When the space amount corresponding to the continuous space in the first free space is greater than or equal to the requested space amount, determine a continuous space whose space amount is greater than or equal to the requested space amount from the first free space to obtain a first allocated space.

[0115] In an embodiment of the present invention, when the terminal compares the requested space amount with the space amount corresponding to the continuous space in the first free space, if the space amount corresponding to the continuous space in the first free space is greater than or equal to the requested space amount, it indicates that there is sufficient free memory space in the memory pool component, and the memory space requested by the application can be successfully allocated; at this time, the terminal uses the memory pool component to use the continuous memory space in its own first free space, whose space amount is greater than or equal to the requested space amount, as the first allocated space.

[0116] S605. The memory pool component allocates the first allocated space to the target functional component, so that the target functional component uses the first allocated space to implement the operation of the target functional component.

[0117] It should be noted that the first allocated space is the memory space allocated to the target functional component when there is sufficient free memory space in the memory pool component. Therefore, after the terminal obtains the first allocated space, the first allocated space is allocated to the target functional component through the memory pool component, so that the target functional component uses the first allocated space to perform corresponding processing, thereby realizing the operation of the target functional component and further realizing the operation of the application.

[0118] Continue to see Figure 6 In the embodiment of the present invention, S602 also includes S606-S609; that is, when the amount of space corresponding to the continuous space in the first free space is less than the requested amount of space, after the terminal applies for space from the memory system through the memory pool component, the application running method also includes S606-S609, and each step is described below.

[0119] S606: The memory pool component obtains a space allocation success event sent by the memory system, where the space allocation success event includes space address information.

[0120] In an embodiment of the present invention, when the amount of space corresponding to the continuous space in the second free space is compared with the requested amount of space, if the amount of space corresponding to the continuous space in the second free space is greater than or equal to the requested amount of space, it indicates that there is sufficient free memory space in the memory system, so that the memory pool component can successfully obtain the memory space that meets the allocation needs from the memory system; at this time, the memory system also generates a space allocation success event, so that when the memory system sends the space allocation success event to the memory pool component, the terminal also obtains the space allocation success event sent by the memory system through the memory pool component.

[0121] It should be noted that the space allocation success event refers to an event in which there is enough free memory space and the space application is successful; and the space allocation success event includes space address information, which refers to the address information corresponding to the space allocated by the memory system to the memory pool component.

[0122] S607: The memory pool component caches the initial allocation space corresponding to the space address information.

[0123] In the embodiment of the present invention, after the terminal obtains the space address information through the memory pool component, the space corresponding to the space address information, i.e., the initial allocated space, is cached in the memory pool component so as to allocate the memory space through the memory pool component. Here, the space amount corresponding to the initial allocated space is greater than or equal to the requested space amount.

[0124] S608: Determine a second allocated space whose space amount is greater than or equal to the requested space amount from a continuous space composed of the initial allocated space of the cache and the first free space.

[0125] In an embodiment of the present invention, after the memory pool component completes the caching of the initial allocated space, the free memory space in the memory pool component is the initial allocated space and the first free space. At this time, the terminal determines, through the memory pool component, a second allocated space whose amount of space is greater than or equal to the requested amount of space from the continuous space in the free space after the initial allocated space and the first free space are combined.

[0126] S609: Allocate the second allocated space to the target functional component, so that the target functional component uses the second allocated space to implement the operation of the target functional component.

[0127] It should be noted that the second allocated space is a continuous memory space determined for allocation to the target functional component when the memory pool component has insufficient space but the space in the memory is sufficient; thus, after the terminal obtains the second allocated space, the second allocated space is allocated to the target functional component through the memory pool component, so that the target functional component uses the second allocated space to perform corresponding processing, thereby realizing the operation of the target functional component and thus realizing the operation of the application.

[0128] In the embodiment of the present invention, after S505, S506 is also included; that is, after the terminal selects a functional component that meets the preset selection condition from the functional component set and uses the selected functional component as the preset functional component, the operation method of the application also includes S506: sending the preset functional component to the blockchain network so that the nodes of the blockchain network fill the preset functional component into the new block, and when the consensus on the new block is reached, the new block is appended to the end of the blockchain to complete the chain. Here, the terminal puts the preset functional component on the chain to ensure that it cannot be tampered with.

[0129] The following example uses the server uploading the preset functional components to the blockchain network for storage to illustrate the exemplary application of the blockchain network. Figure 7 The client node 810 may be the terminal 400. The business subject 800 and the business subject 900 have been registered in the authentication center 700.

[0130] First, the logic of putting the preset functional component on the chain is set in the client node 810. For example, when the preset functional component is obtained, the client node 810 generates a corresponding transaction when sending the preset functional component to the blockchain network 600. The transaction includes: the smart contract that needs to be called to put the preset functional component on the chain, and the parameters passed to the smart contract; the transaction also includes the digital certificate of the client node 810, the signed digital signature, and the transaction is broadcast to the consensus node 610 in the blockchain network 600.

[0131] Then, when the consensus node 610 in the blockchain network 600 receives the transaction, it verifies the digital certificate and digital signature carried in the transaction. After successful verification, it confirms whether the business subject 800 has transaction authority based on the identity of the business subject 800 carried in the transaction. Any verification judgment in the digital signature and authority verification will cause the transaction to fail. After successful verification, the consensus node 610 signs its own digital signature (for example, using the private key of the consensus node 610 to encrypt the summary of the transaction) and continues to broadcast in the blockchain network 600.

[0132] Finally, after receiving the successfully verified transaction, the consensus node 610 in the blockchain network 600 fills the transaction into a new block and broadcasts it. When the consensus node 610 in the blockchain network 600 broadcasts a new block, it verifies the new block, for example, verifies whether the digital signature of the transaction in the new block is valid. If the verification is successful, the new block is appended to the end of the blockchain stored by itself, and the state database is updated according to the result of the transaction, and the transaction in the new block is executed: for the submitted transaction storing the preset functional component, the key-value pair including the preset functional component is added to the state database.

[0133] Taking the example of a server querying a preset functional component in the blockchain network 600, an exemplary application of the blockchain network is described. Figure 7 , the client node 910 may be the terminal 400 .

[0134] In some embodiments, the type of data that the client node 910 can query in the blockchain network 600 can be achieved by the consensus node 610 by restricting the permissions of transactions that can be initiated by the client stage of the business entity. When the client node 910 has the permission to initiate a query of the preset functional component, the client node 910 can generate a transaction for querying the preset functional component and submit it to the blockchain network 600. The transaction is executed from the consensus node 610 to query the corresponding preset functional component from the state database and return to the client node 910.

[0135] The application is explained by taking the application scenario in which the application is running on the terminal as an example: the terminal sets the preset functional components and uploads the preset functional components to the chain; when the application is running, the preset functional components are obtained from the blockchain network to release space, so that the objects for space release can be accurately determined; in this way, the robustness and security of the application operation can be improved.

[0136] It should be noted that, in the embodiment of the present invention, applying for space and applying for memory space belong to the same description.

[0137] The following describes an exemplary application of an embodiment of the present invention in a practical application scenario.

[0138] For example, see Figure 8 , Figure 8 is a schematic diagram of an exemplary application for memory space provided by an embodiment of the present invention; Figure 8 As shown, when application 8-1 is running in the terminal, each functional component included in application 8-1 (data cache component 8-11, other components 8-12, log component 8-13 and network component 8-14, etc.) applies for memory space from the memory system 8-2 through the memory pool component 8-15 to perform corresponding processing to support the normal operation of application 8-1 on the mobile phone.

[0139] based on Figure 8 In application 8-1, the memory space application process is as follows: Fig. 9 As shown:

[0140] S901, start; that is, start to execute the application of memory space.

[0141] S902, the functional component applies for memory space from the memory pool component; that is, the functional component of application 8-1 (the target functional component, which is any functional component among the data cache component 8-11, other components 8-12, log component 8-13 and network component 8-14) applies for memory space from the memory pool component 8-15.

[0142] S903, determine whether the memory space application is successful, if yes, execute S904, if not, execute S905.

[0143] S904, yes; that is, the free memory space of the memory pool component 8-15 is sufficient or the free memory space of the memory system 8-2 is sufficient, and the application is successful; at this time, the application 8-1 runs normally, executes S911, and ends the memory space application process.

[0144] S905: No; that is, the free memory space (first free space) of the memory pool component 8-15 is insufficient and the free memory space (second free space) of the memory system 8-2 is also insufficient, and S906 is executed.

[0145] S906. The preset functional component releases space; that is, the memory pool component 8-15 instructs the data cache component 8-11 to release space.

[0146] S907, determine whether the space release is successful; that is, determine whether the released space can meet the application requirements, that is, determine whether the amount of space corresponding to the continuous space of the released space and the free memory space in the memory pool component 8-15 is greater than or equal to the requested space amount.

[0147] S908, yes; that is, the continuous space corresponding to the released space and the free memory space of the memory pool component 8-15 can meet the requested memory space; at this time, execute S902, because the free memory space in the memory pool component 8-15 is sufficient at this time, so the application 8-1 component applies for memory space from the memory pool component 8-15, and can successfully apply for the required memory space, the application runs normally, and executes S911 to end the memory space application process.

[0148] S909, no; that is, when the released space and the free memory space of the memory pool component 8-15 correspond to the continuous space, the application space application component 8-1 fails, and the application 8-1 cannot run and cause downtime, and execute S910.

[0149] S910, the application cannot run; that is, the application cannot run and causes a crash, and S911 is executed to end the memory space application process.

[0150] S911, end; that is, end the memory space application process.

[0151] It should be noted that the memory pool component 8-15 is used to obtain the event of failure to apply for memory space from the memory system 8-2 and the memory space released by the cache data cache component 8-11:

[0152] 1) Obtaining an event of failure to apply for memory space from the memory system 8-2. The event of failure to apply for memory space from the memory system 8-2 indicates that the memory system 8-2 has insufficient memory space. Obtaining the event of failure to apply for memory space from the memory system 8-2 and instructing the data cache component 8-11 to release the memory space.

[0153] 2) Cache the memory space released by the data cache component 8-11. In this way, the memory space released by the data cache component 8-11 is guaranteed to be held by the memory pool component 8-15 to meet the application of the memory space by the component applying for the memory space; otherwise, for example, releasing the memory space to the memory system 8-2 may be preempted by other applications.

[0154] based on Figure 8 , Fig.10 is a schematic diagram of an exemplary process for implementing application operation provided by an embodiment of the present invention, such as Fig.10 As shown:

[0155] S1001. The network component applies for memory space from the memory pool component.

[0156] It should be noted that the network component 8-14 (target function component) of Application 8-1 applies to the memory pool component 8-15 for m bits (requested space amount m>0) of memory space. If the current continuous free memory in the memory pool component 8-15 (the space amount corresponding to the continuous space in the first free space) is i bits and i<m, the memory space of the memory pool component 8-15 is insufficient, and S1002 is executed.

[0157] S1002: The free memory space of the memory pool component is insufficient, and it applies to the memory system for memory space.

[0158] It should be noted that the memory pool component 8-15 applies to the memory system 8-2 for n bits (n>=m) of memory space. If the memory space of the memory system 8-2 is also insufficient, S1003 is executed. If the memory system 8-2 can meet the requirement of n bits, the memory system 8-2 allocates n bits of memory space (initial allocation space) to the memory pool component 8-15, and the memory pool component 8-15 allocates m bits of memory space to the network component 8-14.

[0159] S1003: The free memory space of the memory system is insufficient, and an application failure message is returned.

[0160] It should be noted that the memory pool component 8-15 executes S1004 according to the application failure message returned by the memory system 8-2 (for example, the returned return value is a null value, and the space allocation failure event).

[0161] S1004: The memory pool component instructs the data cache component to release space.

[0162] It should be noted that after the memory pool component 8-15 obtains the application failure message, it determines that the free memory space in the memory system 8-2 is also insufficient. Therefore, the memory pool component 8-15 passes through the callback function embedded in the data cache component 8

[0163] -11 to instruct the data cache component 8-11 to release space and execute S1005.

[0164] S1005: The data cache component releases memory space.

[0165] It should be noted that the data cache component 8-11 releases the space occupied by the corresponding cache data (for example, audio cache information, video playback information, etc.) to the memory pool component 8-15 until the continuous free memory k>=m in the memory pool component 8-15, and executes S1006. Here, if the space is released, the released memory space still cannot meet the application of m bits of memory space, then the application 8-1 still cannot run; and the released cache data is data that does not affect the basic operation of the application 8-1, and the data that affects the basic operation of the application 8-1 cannot be released, which can be customized according to the actual situation (for example, the memory space occupied by the user authentication information cannot be released, etc.).

[0166] S1006. The memory pool component allocates memory space to the network component.

[0167] It should be noted that when there is sufficient free memory space in the current memory pool component 8-15 to meet the allocation of m-bit memory space, the memory pool component 8-15 allocates m-bit memory space to the network component 8-14; thereby the network component 8-14 continues to work normally according to the obtained m-bit memory space, so that the application 8-1 can operate normally.

[0168] The following further describes an exemplary structure of the operating device 455 provided in an embodiment of the present invention implemented as a software module. In some embodiments, Figure 4 As shown, the software modules stored in the operating device 455 of the memory 450 may include:

[0169] The event response module 4551 is used to respond to the space allocation failure event and obtain the requested space amount requested by the target functional component; the space allocation failure event refers to an event in which the space application fails due to insufficient free memory space, and the target functional component is any functional component in the application;

[0170] The space release module 4552 is used to instruct the preset functional component of the application to release the space occupied by the cache data of the preset functional component to obtain the to-be-allocated space whose space amount is greater than or equal to the requested space amount;

[0171] The space allocation module 4553 is used to allocate the space to be allocated to the target functional component, so that the target functional component uses the space to be allocated to realize the operation of the target functional component.

[0172] In some embodiments, the application further includes a memory pool component, the memory pool component being used to control allocation of free memory space of the application;

[0173] The event response module 4551 is further used to respond to the space allocation failure event through the memory pool component and obtain the requested space amount requested by the target functional component.

[0174] The space release module 4552 is further used to instruct the preset function component through the memory pool component to release the space occupied by the cache data of the preset function component to obtain the to-be-allocated space whose amount of space is greater than or equal to the requested amount of space.

[0175] The space allocation module 4553 is also used to allocate the to-be-allocated space to the target functional component through the memory pool component.

[0176] In some embodiments, the operating device 455 also includes a setting module 4554, which is used to obtain the various functional components corresponding to the application to obtain a set of functional components; select functional components that meet preset selection conditions from the set of functional components, and use the selected functional components as the preset functional components; the preset selection conditions include at least one of the cached data volume, data type and component function.

[0177] In some embodiments, the space release module 4552 is also used to use the free memory space corresponding to the memory pool component as the first free space; through the memory pool component, instruct the preset function component to release the space occupied by the cached data of the preset function component until the amount of space of the released space combined with the continuous space composed of the first free space is not less than the requested space amount, stop releasing and obtain the target released space; determine the to-be-allocated space whose amount of space is greater than or equal to the requested space amount from the continuous space composed of the target released space and the first free space.

[0178] In some embodiments, the space release module 4552 is also used to cache the target released space through the memory pool component; determine the to-be-allocated space whose amount of space is greater than or equal to the requested amount of space from the continuous space consisting of the cached target released space and the first free space.

[0179] In some embodiments, the operating device 455 also includes an event acquisition module 4555, which is used to obtain, through the memory pool component, a space application request sent by the target functional component; the space application request includes the requested space amount; when the amount of space corresponding to the continuous space in the first free space is less than the requested space amount, applying for space from the memory system through the memory pool component; obtaining the space allocation failure event sent by the memory system through the memory pool component; wherein, the space allocation failure event is generated when the amount of space corresponding to the continuous space in the second free space of the memory system is less than the requested space amount, and the second free space is the free memory space of the memory system.

[0180] In some embodiments, the space allocation module 4553 is also used to determine, from the first free space, a continuous space whose amount of space is greater than or equal to the requested amount of space, to obtain a first allocated space when the amount of space corresponding to the continuous space in the first free space is greater than or equal to the requested amount of space; and allocate the first allocated space to the target functional component through the memory pool component, so that the target functional component uses the first allocated space to implement the operation of the target functional component.

[0181] In some embodiments, the space allocation module 4553 is also used to obtain the space allocation success event sent by the memory system through the memory pool component; the space allocation success event includes space address information; the initial allocation space corresponding to the space address information is cached by the memory pool component; the amount of space corresponding to the initial allocation space is greater than or equal to the requested amount of space; from the continuous space composed of the cached initial allocation space and the first free space, determine a second allocation space with an amount of space greater than or equal to the requested amount of space; allocate the second allocation space to the target functional component, so that the target functional component uses the second allocation space to implement the operation of the target functional component.

[0182] An embodiment of the present invention provides a computer-readable storage medium storing executable instructions, wherein executable instructions are stored. When the executable instructions are executed by a processor, the processor will cause the processor to execute the application running method provided by the embodiment of the present invention, for example, Figure 5 and Figure 6 The method of running the application shown.

[0183] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EP ROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.

[0184] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0185] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (for example, files storing one or more modules, subroutines, or code portions).

[0186] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.

[0187] To summarize, through the embodiments of the present invention, by capturing the event of failed memory space application and instructing the preset functional component to release the space occupied by the cached data of the preset functional component according to the amount of space requested by the event, the target functional component can apply for enough space to implement the operation of the target functional component, thereby realizing the operation of the application; that is, even when the free memory space is insufficient and the application cannot run, the normal operation of the application can be realized by misappropriating the memory space occupied by the cached data of other functional components; therefore, the robustness of the application operation can be improved.

[0188] The above description is only an embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement and improvement made within the spirit and scope of the present invention are included in the protection scope of the present invention.

Claims

1. A method for running an application, characterized in that: include: The memory pool component included in the application responds to the space allocation failure event to obtain the requested space amount requested by the target functional component; The space allocation failure event refers to an event in which the space application fails due to insufficient free memory space, and the target functional component is any functional component in the application; Using the free memory space corresponding to the memory pool component as the first free space; The memory pool component instructs the preset functional component to release the space occupied by the cache data of the preset functional component until the amount of the continuous space composed of the released space and the first free space is not less than the requested space amount, and then stops releasing to obtain the target released space; Determine, from a continuous space consisting of the target released space and the first free space, a to-be-allocated space whose space amount is greater than or equal to the requested space amount; The memory pool component allocates the to-be-allocated space to the target functional component, so that the target functional component uses the to-be-allocated space to implement the operation of the target functional component; The memory pool component responds to the space allocation failure event to obtain the requested space amount requested by the target functional component, including: The memory pool component obtains space application information corresponding to the target functional component according to the space allocation failure event; The requested space amount requested by the target functional component is obtained according to the space application information corresponding to the target functional component.

2. The method according to claim 1, characterized in that Before the memory pool component responds to the space allocation failure event and obtains the requested space amount requested by the target functional component, the method further includes: Acquire each functional component corresponding to the application to obtain a functional component set; Select a functional component that meets a preset selection condition from the functional component set, and use the selected functional component as the preset functional component; the preset selection condition includes at least one of the cache data volume, data type and component function.

3. The method according to claim 1, characterized in that The determining, from a continuous space consisting of the target released space and the first free space, the to-be-allocated space whose space amount is greater than or equal to the requested space amount comprises: The memory pool component caches the target released space; The to-be-allocated space whose space amount is greater than or equal to the requested space amount is determined from a continuous space consisting of the target released space of the cache and the first free space.

4. The method according to claim 1 or 3, characterized in that: Before the memory pool component responds to the space allocation failure event and obtains the requested space amount requested by the target functional component, the method further includes: The memory pool component obtains the space application request sent by the target functional component; the space application request includes the requested space amount; When the space amount corresponding to the continuous space in the first free space is less than the requested space amount, the memory pool component applies for space from the memory system; The memory pool component obtains the space allocation failure event sent by the memory system; The space allocation failure event is generated when the space amount corresponding to the continuous space in the second free space of the memory system is less than the requested space amount, and the second free space is the free memory space of the memory system.

5. The method according to claim 4, characterized in that After the memory pool component obtains the space application request sent by the target functional component, the method further includes: When the space amount corresponding to the continuous space in the first free space is greater than or equal to the requested space amount, determining the continuous space whose space amount is greater than or equal to the requested space amount from the first free space to obtain the first allocated space; The memory pool component allocates the first allocated space to the target functional component, so that the target functional component uses the first allocated space to implement the operation of the target functional component.

6. The method according to claim 4, characterized in that When the space amount corresponding to the continuous space in the first free space is less than the requested space amount, after the memory pool component applies for space from the memory system, the method further includes: The memory pool component obtains a space allocation success event sent by the memory system; the space allocation success event includes space address information; The memory pool component caches the initial allocated space corresponding to the space address information; the space amount corresponding to the initial allocated space is greater than or equal to the requested space amount; Determine a second allocated space whose space amount is greater than or equal to the requested space amount from a continuous space composed of the initial allocated space of the cache and the first free space; The second allocated space is allocated to the target functional component, so that the target functional component uses the second allocated space to implement the operation of the target functional component.

7. An application running device, characterized in that: include: A memory for storing executable instructions; A processor, configured to implement the method for running the application according to any one of claims 1 to 6 when executing the executable instructions stored in the memory.

8. A computer-readable storage medium, characterized in that: Executable instructions are stored, which are used to cause a processor to execute and implement the operating method of the application described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Management method and device of memories

    CN103885569A

  • Cache recovery method and device

    CN105446814A

  • Method for improving game fluency under low-memory Android device

    CN105760228A

  • Memory management method, device, terminal and storage medium applied to browser

    CN109117274A

  • Browser memory management method, device and equipment

    CN110110262A