CN104965708A - Method and apparatus for managing memory in application program running process - Google Patents

Method and apparatus for managing memory in application program running process Download PDF

Info

Publication number
CN104965708A
CN104965708A CN201510377466.8A CN201510377466A CN104965708A CN 104965708 A CN104965708 A CN 104965708A CN 201510377466 A CN201510377466 A CN 201510377466A CN 104965708 A CN104965708 A CN 104965708A
Authority
CN
China
Prior art keywords
interface
internal memory
data
shared
transferable
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510377466.8A
Other languages
Chinese (zh)
Other versions
CN104965708B (en
Inventor
廖松茂
刘鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201510377466.8A priority Critical patent/CN104965708B/en
Publication of CN104965708A publication Critical patent/CN104965708A/en
Application granted granted Critical
Publication of CN104965708B publication Critical patent/CN104965708B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

Embodiments of the invention provide a method and an apparatus for managing a memory in an application program running process, and the method and the apparatus are applied to a device adopting an Android system and used for managing the memory in a stack accumulation mode. The method comprises the steps of: pressing the memory occupied by each interface into a stack according to an opening sequence of interfaces in an open application program; converting transferable data of a hidden interface to be in a file form and storing the data into a user storage space; when the hidden interface is opened, switching the hidden interface into a current display interface and recovering the transferable data, in the file form, of the interface to the memory from the user storage space; and pressing the memory occupied by the transferable data of the interface and the memory occupied by non-transferable data of the interface into the top of the stack. By applying the embodiments of the invention, the possibility of exceeding the preset upper limit of memory usage along with increment of open interfaces in the application program running process is reduced, so that the phenomenon of memory leakage in the application program running process is reduced.

Description

A kind of EMS memory management process of application program operational process and device
Technical field
The present invention relates to a kind of EMS memory management process and device of application program operational process.
Background technology
At present, Android Andriod system has become the operating system generally adopted.Usually, each application program under this operating system needs to take the internal memory in the equipment adopting Andriod system in operational process.In the process of running application, when opening the arbitrary interface of execution, all data at this interface are all stored in internal memory.In android system, the internal memory shared by interface of application program is the memory management pattern (as Fig. 1) that a kind of storehouse adds up, and the internal memory shared by application program constantly can increase along with the cumulative of the number of interfaces opened.General, android system can be preset one for each application program and allow to use internal memory, this permission uses internal memory to have a higher limit, when the internal memory shared by Application Program Interface is excessive, internal memory just likely in operational process shared by application program exceedes this upper limit, thus causes system to occur memory overflow.
In prior art, for the situation occurring RAM leakage, provide so a kind of solution: when judging to occur memory overflow, turn off the process corresponding to this application program immediately, namely, this application program of compulsory withdrawal.
Obviously, turn off the process corresponding to this application program, the application program that user is opened is forced to exit, and have impact on the operating experience of user like this.
Summary of the invention
The object of the embodiment of the present invention is the EMS memory management process and the device that provide a kind of application program operational process, to reduce the phenomenon of the RAM leakage occurred in application program operational process.
For achieving the above object, the embodiment of the invention discloses a kind of EMS memory management process of application program operational process, being applied in the equipment adopting Android Andriod system, internally deposit into line pipe reason in the mode that storehouse is cumulative, comprising:
According to the opening sequence at each interface in the application program opened, by internal memory press-in stack shared by each interface;
Wherein, the internal memory shared by interface being positioned at the current display of stack top comprises: the internal memory shared by transferable data at this interface divided in advance and this interface can not internal memory shared by transferring data; The internal memory shared by hiding interface being positioned at stack top comprises: the internal memory shared by the transferring data at this interface divided in advance;
The transferable data at described hiding interface are converted into document form and are stored in user storage space;
When hiding interface is opened, this hiding changing interface is current display interface, by the transferable data of the document form at this interface, returns in internal memory from user storage space; And by the internal memory shared by the transferable data at this interface and this interface can not internal memory press-in stack top shared by transferring data.
Preferably, the transferable data at described this interface divided in advance are this interface picture that will load and/or file; Described this interface divided in advance can not transferring data be the data of this interface except the picture that will load and/or file.
Preferably, the transferable data at described hiding interface are converted into the step that document form is stored to user storage space, comprising:
When the changing interface of the current display being positioned at stack top is, when hiding interface, transferable for this interface data are converted to document form and are stored to user storage space, and discharge internal memory shared by the transferable data in this interface.
Preferably, described by the transferable data of the document form at this interface, from user storage space, return to the step in internal memory, comprising:
By the transferable data of the document form at this interface, return in the first internal memory from user storage space; Save as in described first: when this interface is first for current display interface, the internal memory shared by transferable data.
Preferably, also comprise:
When the interface of the current display being positioned at stack top executes, what discharge the internal memory shared by transferable data at this interface and this interface can not internal memory shared by transferring data.
Preferably, call by local programming interface JNI transferable data that default C/C++ function realizes described hiding interface to be converted into document form and to be stored in user storage space;
Described when hiding interface is opened, this hiding changing interface is current display interface, calls default C/C++ function realize, by the transferable data of the document form at this interface, returning in internal memory from user storage space by local programming interface JNI; And by the internal memory shared by the transferable data at this interface and this interface can not internal memory press-in stack top shared by transferring data.
For achieving the above object, the embodiment of the invention discloses a kind of memory management device of application program operational process, being applied in the equipment adopting Android android system, internally deposit into line pipe reason in the mode that storehouse is cumulative, comprising:
The stacked module of internal memory, for the opening sequence according to each interface in the application program opened, by internal memory press-in stack shared by each interface;
Wherein, the internal memory shared by interface being positioned at the current display of stack top comprises: the internal memory shared by transferable data at this interface divided in advance and this interface can not internal memory shared by transferring data; The internal memory shared by hiding interface being positioned at stack top comprises: the internal memory shared by the transferring data at this interface divided in advance;
Data memory module, the transferable data for described hiding interface are converted into document form and are stored in user storage space;
Memory management module, for when hiding interface is opened, this hiding changing interface is current display interface, by the transferable data of the document form at this interface, returns in internal memory from user storage space; And by the internal memory shared by the transferable data at this interface and this interface can not internal memory press-in stack top shared by transferring data.
Preferably, the transferable data at described this interface divided in advance are this interface picture that will load and/or file; Described this interface divided in advance can not transferring data be the data of this interface except the picture that will load and/or file.
Preferably, described data memory module, specifically for:
When the changing interface of the current display being positioned at stack top is, when hiding interface, transferable for this interface data are converted to document form and are stored to user storage space, and discharge internal memory shared by the transferable data in this interface.
Preferably, described memory management module, comprising: data recovery sub-module and press-in stack top submodule; Wherein,
Described data recovery sub-module, for when hiding interface is opened, this hiding changing interface is current display interface, by the transferable data of the document form at this interface, returns in internal memory from user storage space;
Described press-in stack top submodule, for when hiding interface is opened, by the internal memory shared by the transferable data at this interface and this interface can not internal memory press-in stack top shared by transferring data.
Preferably, described data recovery sub-module, specifically for:
By the transferable data of the document form at this interface, return in the first internal memory from user storage space; Save as in described first: when this interface is first for current display interface, the internal memory shared by transferable data.
Preferably, described memory management device also comprises: internal memory release module; Wherein,
Described internal memory release module, for when the interface of the current display being positioned at stack top executes, what discharge the internal memory shared by transferable data at this interface and this interface can not internal memory shared by transferring data.
Preferably, described data memory module, the transferable data realizing described hiding interface specifically for being called default C/C++ function by local programming interface JNI are converted into document form and are stored in user storage space;
Described memory management module, specifically for:
When hiding interface is opened, this hiding changing interface is current display interface, calls default C/C++ function realize, by the transferable data of the document form at this interface, returning in internal memory from user storage space by local programming interface JNI; And by the internal memory shared by the transferable data at this interface and this interface can not internal memory press-in stack top shared by transferring data.
The EMS memory management process of a kind of application program operational process that the embodiment of the present invention provides and device, divide the data based on Andriod systematic difference program interface in advance, is divided into transferable data and can not transferring data by interface data.Like this, in the operational process of application program, the transferable data at hiding interface are stored in user storage space with document form, thus can not storage space in committed memory, like this, reduce the possibility exceeding default internal memory SC service ceiling in application program operational process along with opening increasing of interface, thus decrease the phenomenon of the RAM leakage occurred in application program operational process.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The structural representation of the memory management pattern that Fig. 1 adds up for a kind of storehouse provided in prior art;
The structural representation of the memory management pattern that a kind of storehouse that Fig. 2 provides for the embodiment of the present invention adds up;
The schematic flow sheet of the EMS memory management process of a kind of application program operational process that Fig. 3 provides for the embodiment of the present invention;
The structural representation of the memory management device of a kind of application program operational process that Fig. 4 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The structural representation of the memory management pattern that Fig. 1 adds up for a kind of storehouse provided in prior art, here mentioned " the memory management pattern that storehouse is cumulative " has mainly used in data structure the stacked thought of popping " first entering to go out afterwards; last in, first out ", for example, adopt in the equipment of android system at one and run an application A, when opening the interface a1 performed in this application program, all data in the a1 of interface are all stored in internal memory by this equipment; If open again execution interface a2, all data of interface a2 can all be stored in internal memory by this equipment equally.Obviously, a1 is the interface of first opening, and can think first stacked interface; The interface that a2 opens after being, can think rear stacked interface.According to the rule of above-mentioned " first enter to go out afterwards, last in, first out ", when interface, a2 is finished, and after the internal memory of release shared by a2, interface a1 just can discharge the internal memory shared by it after interface a1 is finished.
General, android system can be preset one for each application program and allow to use internal memory, this permission uses internal memory to have a higher limit, when the internal memory shared by Application Program Interface is excessive, internal memory just likely in operational process shared by application program exceedes this upper limit, thus causes system to occur memory overflow.In prior art, for the situation occurring RAM leakage, provide so a kind of solution: when judging to occur memory overflow, turn off the process corresponding to this application program immediately, namely, this application program of compulsory withdrawal.Obviously, turn off the process corresponding to this application program, the application program that user is opened is forced to exit, and have impact on the operating experience of user like this.As shown in Figure 1, shared by 1 to interface, interface 4, memory size is respectively 15M, if the internal memory SC service ceiling that this equipment is preset is 50M, obviously, when opening interface 4, has occurred RAM leakage in this application program operational process.The solution conventionally provided, this application program will be forced to exit.
Below, for the problems referred to above, composition graphs 2 and the EMS memory management process of Fig. 3 to the application program operational process that the embodiment of the present invention provides describe in detail.
See Fig. 3, the schematic flow sheet of the EMS memory management process of a kind of application program operational process provided for the embodiment of the present invention, be applied in the equipment adopting Android Andriod system, internally deposit into line pipe reason in the mode that storehouse is cumulative, the method can comprise the following steps:
Step S101: according to the opening sequence at each interface in the application program opened, by internal memory press-in stack shared by each interface;
Wherein, the internal memory shared by interface being positioned at the current display of stack top comprises: the internal memory shared by transferable data at this interface divided in advance and this interface can not internal memory shared by transferring data; The internal memory shared by hiding interface being positioned at stack top comprises: the internal memory shared by the transferring data at this interface divided in advance.
It should be noted that, usually, internal memory shared by image data in interface or file data is the major part of internal memory shared by whole interface, the picture that in the embodiment of the present invention, the transferable data at said this interface divided in advance will be able to load for this interface and/or file; Said this interface divided in advance can not transferring data can be the data of this interface except the picture that will load and/or file.Certainly, the present invention does not need dividing transferable data and can not the concrete mode of transferring data limiting, and those skilled in the art need reasonably to arrange according to practical situations.
Step S102: the transferable data at described hiding interface are converted into document form and are stored in user storage space.
Wherein, see Fig. 2, the part in dotted line frame represents the transferable data at the hiding interface being positioned at non-stack top location, and this part data can be stored in user storage space by the form of file.
It should be noted that, above-mentioned user storage space is different from the internal memory in this equipment, and such as, this user storage space can be easily extensible storage card in the handheld device such as mobile phone, Ipad etc.Certainly, the present invention does not need to limit this user storage space, and any possible implementation all can be applied to the present invention.
In a kind of specific embodiment of the present invention, step S102 can comprise: when the changing interface of the current display being positioned at stack top is when hiding interface, transferable for this interface data are converted to document form and are stored to user storage space, and discharge internal memory shared by the transferable data in this interface.
Step S103: when hiding interface is opened, this hiding changing interface is current display interface, by the transferable data of the document form at this interface, returns in internal memory from user storage space; And by the internal memory shared by the transferable data at this interface and this interface can not internal memory press-in stack top shared by transferring data.
Concrete, by the transferable data of the document form at this interface in step S103, from user storage space, return to the step in internal memory, can comprise:
By the transferable data of the document form at this interface, return to from user storage space in the first internal memory.
Wherein, save as in above-mentioned first: when this interface is first for current display interface, the internal memory shared by transferable data.
In a kind of embodiment of the present invention, above-mentioned EMS memory management process can also comprise: when the interface of the current display being positioned at stack top executes, and what discharge the internal memory shared by transferable data at this interface and this interface can not internal memory shared by transferring data.
It should be noted that, can call by local programming interface JNI transferable data that default C/C++ function realizes described hiding interface and be converted into document form and be stored in user storage space; Equally, when hiding interface is opened, this hiding changing interface is current display interface, can call default C/C++ function realize, by the transferable data of the document form at this interface, returning in internal memory from user storage space by local programming interface JNI; And by the internal memory shared by the transferable data at this interface and this interface can not internal memory press-in stack top shared by transferring data.
The application embodiment of the present invention, divides the data based on Andriod systematic difference program interface in advance, is divided into transferable data and can not transferring data by interface data.Like this, in the operational process of application program, the transferable data at hiding interface are stored in user storage space with document form, thus can not storage space in committed memory, like this, reduce the possibility exceeding default internal memory SC service ceiling in application program operational process along with opening increasing of interface, thus decrease the phenomenon of the RAM leakage occurred in application program operational process.
In order to clearly understand this programme, be described in detail from the implementation procedure of research and development angle to the EMS memory management process mentioned the present invention below, concrete steps are as follows:
(1) data that can be transferred to native space in application program are analyzed; Wherein, having in internal memory shared in the interface of Android application program is for data and the file data of Loading Image greatly, usually the internal memory shared by data of this part is the data that can shift, and technician can carry out application and the release of internal memory in native space to this part transferable data by C/C++.
It should be noted that, native space mentioned here is to adopt in the equipment of android system open up especially in memory headroom one internal memory with specific function, can apply for internal memory for the transferable data in the current interface of stack top in native space; Just can be stored in user storage space after must being first transferred to native space for the transferable data in the hiding interface of non-stack top.
(2) the Java code for internal memory application corresponding to the internal memory shared by above-mentioned transferable data carry out JNIization.
It should be noted that, JNI (Java Native Interface) standard has become a part for Java platform, its allow Java code with adopt other programming languages write (C/C++) code carry out alternately.The JNIization of carrying out code does not hinder and uses other programming languages, as long as support that calling convention is just passable.The object done like this allows Java code only need, by calling the C/C++ code managed native space, just can complete the internal memory application in native space and release.
Wherein, after the Java code being used for internal memory application carry out JNIization, the C/C++ code called can realize following functions:
A: in native space, to be arranged in stack top interface transferable data shared by internal memory carry out internal memory application, and the transferable data in the interface of non-stack top to be stored in user storage space with document form.
B: in operational process, when the changing interface of the current display being positioned at stack top is when hiding interface, memory management instrument can be utilized by the transferable data batchmove in former stack top interface to user storage space, then discharge the native space shared by transferable data in former stack top interface, native space, and in native space, internal memory application is carried out to current new stack top interface.
C: when the interface end of run of new stack top, what can discharge the internal memory shared by transferable data at stack top interface in native space and stack top interface can not internal memory shared by transferring data.
It should be noted that, the embodiment of the present invention does not carry out internal memory application to the transferable data in the interface of non-stack top in native space.Exactly because also like this, the memory size shared by the data in application program median surface can be reduced.
Wherein, technician utilizes memory management instrument (NativeMemoryManager) by the transferable data batchmove of non-stack top to storage space, it should be noted that, this memory management instrument is the instruments of those skilled in the art by a kind of management for carrying out Native space internal memory of programming realization, the internal memory corresponding to each interface can be managed, when the current interface of stack top changes, transferable data in former stack top interface are saved to user storage space and discharge in the internal memory shared by the transferable data in the interface of former stack top, when this interface is positioned at stack top again, by the transferable Data import in user storage space in original shared internal memory.
It should be noted that, when hiding interface returns to new stack top, utilize memory management instrument to reload in native space by the transferable data being stored in user storage space in this interface, can ensure that the total data in current interface returns in the internal memory of equipment like this.
By above step, can realize preserving the internal memory shared by the stack top interface of Android application program, and the not transferable partial memory in non-stack top interface is preserved, also reduce the memory size that Android application program entirety takies simultaneously, the most important thing is, the implementation status at each interface can not be affected.
The structural representation of the memory management device of a kind of application program operational process that Fig. 4 provides for the embodiment of the present invention, be applied in the equipment adopting Android android system, internally deposit into line pipe reason in the mode that storehouse is cumulative, can comprise: the stacked module 210 of internal memory, data memory module 220 and memory management module 230.
Wherein, the stacked module 210 of internal memory, for the opening sequence according to each interface in the application program opened, by internal memory press-in stack shared by each interface.
Concrete, the internal memory shared by interface being positioned at the current display of stack top can comprise: the internal memory shared by transferable data at this interface divided in advance and this interface can not internal memory shared by transferring data.
Concrete, the internal memory shared by hiding interface being positioned at stack top can comprise: the internal memory shared by the transferring data at this interface divided in advance.
Data memory module 220, the transferable data for described hiding interface are converted into document form and are stored in user storage space.
In a kind of specific embodiment of the present invention, above-mentioned data memory module 220, specifically may be used for:
When the changing interface of the current display being positioned at stack top is, when hiding interface, transferable for this interface data are converted to document form and are stored to user storage space, and discharge internal memory shared by the transferable data in this interface.
It should be noted that, above-mentioned data memory module 220, the transferable data realizing described hiding interface specifically for being called default C/C++ function by local programming interface JNI are converted into document form and are stored in user storage space.
Memory management module 230, for when hiding interface is opened, this hiding changing interface is current display interface, by the transferable data of the document form at this interface, returns in internal memory from user storage space; And by the internal memory shared by the transferable data at this interface and this interface can not internal memory press-in stack top shared by transferring data.
It should be noted that, the transferable data at above-mentioned this interface divided in advance mentioned are this interface picture that will load and/or file; Above-mentioned this interface divided in advance mentioned can not transferring data be the data of this interface except the picture that will load and/or file.
In a kind of specific embodiment of the present invention, above-mentioned memory management module, can comprise: data recovery sub-module and press-in stack top submodule.
Wherein, this data recovery sub-module, for when hiding interface is opened, this hiding changing interface is current display interface, by the transferable data of the document form at this interface, returns in internal memory from user storage space.
Wherein, this press-in stack top submodule, for when hiding interface is opened, by the internal memory shared by the transferable data at this interface and this interface can not internal memory press-in stack top shared by transferring data.
Concrete, this data recovery sub-module, may be used for: by the transferable data of the document form at this interface, returns in the first internal memory from user storage space; Save as in above-mentioned first: when this interface is first for current display interface, the internal memory shared by transferable data.
In one preferred embodiment of the invention, above-mentioned memory management device can also comprise: internal memory release module.
Wherein, above-mentioned internal memory release module, for when the interface of the current display being positioned at stack top executes, what discharge the internal memory shared by transferable data at this interface and this interface can not internal memory shared by transferring data.
It should be noted that, above-mentioned memory management module, specifically for:
When hiding interface is opened, this hiding changing interface is current display interface, calls default C/C++ function realize, by the transferable data of the document form at this interface, returning in internal memory from user storage space by local programming interface JNI;
By the internal memory shared by the transferable data at this interface and this interface can not internal memory press-in stack top shared by transferring data.
The application embodiment of the present invention, divides the data based on Andriod systematic difference program interface in advance, is divided into transferable data and can not transferring data by interface data.Like this, in the operational process of application program, the transferable data at hiding interface are stored in user storage space with document form, thus can not storage space in committed memory, like this, reduce the possibility exceeding default internal memory SC service ceiling in application program operational process along with opening increasing of interface, thus decrease the phenomenon of the RAM leakage occurred in application program operational process.
For system or device embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
It should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other identical element.
One of ordinary skill in the art will appreciate that all or part of step realized in said method embodiment is that the hardware that can carry out instruction relevant by program has come, described program can be stored in computer read/write memory medium, here the alleged storage medium obtained, as: ROM/RAM, magnetic disc, CD etc.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.All any amendments done within the spirit and principles in the present invention, equivalent replacement, improvement etc., be all included in protection scope of the present invention.

Claims (13)

1. an EMS memory management process for application program operational process, is characterized in that, is applied in the equipment adopting Android Andriod system, internally deposits into line pipe reason, comprising in the mode that storehouse is cumulative:
According to the opening sequence at each interface in the application program opened, by internal memory press-in stack shared by each interface;
Wherein, the internal memory shared by interface being positioned at the current display of stack top comprises: the internal memory shared by transferable data at this interface divided in advance and this interface can not internal memory shared by transferring data; The internal memory shared by hiding interface being positioned at stack top comprises: the internal memory shared by the transferring data at this interface divided in advance;
The transferable data at described hiding interface are converted into document form and are stored in user storage space;
When hiding interface is opened, this hiding changing interface is current display interface, by the transferable data of the document form at this interface, returns in internal memory from user storage space; And by the internal memory shared by the transferable data at this interface and this interface can not internal memory press-in stack top shared by transferring data.
2. EMS memory management process according to claim 1, is characterized in that, the transferable data at described this interface divided in advance are this interface picture that will load and/or file; Described this interface divided in advance can not transferring data be the data of this interface except the picture that will load and/or file.
3. EMS memory management process according to claim 1, is characterized in that, the transferable data at described hiding interface are converted into the step that document form is stored to user storage space, comprising:
When the changing interface of the current display being positioned at stack top is, when hiding interface, transferable for this interface data are converted to document form and are stored to user storage space, and discharge internal memory shared by the transferable data in this interface.
4. EMS memory management process according to claim 1, is characterized in that, described by the transferable data of the document form at this interface, returns to the step in internal memory, comprising from user storage space:
By the transferable data of the document form at this interface, return in the first internal memory from user storage space; Save as in described first: when this interface is first for current display interface, the internal memory shared by transferable data.
5. EMS memory management process according to claim 1, is characterized in that, also comprises:
When the interface of the current display being positioned at stack top executes, what discharge the internal memory shared by transferable data at this interface and this interface can not internal memory shared by transferring data.
6. EMS memory management process according to claim 1, is characterized in that,
Call by local programming interface JNI transferable data that default C/C++ function realizes described hiding interface to be converted into document form and to be stored in user storage space;
Described when hiding interface is opened, this hiding changing interface is current display interface, calls default C/C++ function realize, by the transferable data of the document form at this interface, returning in internal memory from user storage space by local programming interface JNI; And by the internal memory shared by the transferable data at this interface and this interface can not internal memory press-in stack top shared by transferring data.
7. a memory management device for application program operational process, is characterized in that, is applied in the equipment adopting Android android system, internally deposits into line pipe reason, comprising in the mode that storehouse is cumulative:
The stacked module of internal memory, for the opening sequence according to each interface in the application program opened, by internal memory press-in stack shared by each interface;
Wherein, the internal memory shared by interface being positioned at the current display of stack top comprises: the internal memory shared by transferable data at this interface divided in advance and this interface can not internal memory shared by transferring data; The internal memory shared by hiding interface being positioned at stack top comprises: the internal memory shared by the transferring data at this interface divided in advance;
Data memory module, the transferable data for described hiding interface are converted into document form and are stored in user storage space;
Memory management module, for when hiding interface is opened, this hiding changing interface is current display interface, by the transferable data of the document form at this interface, returns in internal memory from user storage space; And by the internal memory shared by the transferable data at this interface and this interface can not internal memory press-in stack top shared by transferring data.
8. memory management device according to claim 7, is characterized in that, the transferable data at described this interface divided in advance are this interface picture that will load and/or file; Described this interface divided in advance can not transferring data be the data of this interface except the picture that will load and/or file.
9. memory management device according to claim 7, is characterized in that, described data memory module, specifically for:
When the changing interface of the current display being positioned at stack top is, when hiding interface, transferable for this interface data are converted to document form and are stored to user storage space, and discharge internal memory shared by the transferable data in this interface.
10. memory management device according to claim 7, is characterized in that, described memory management module, comprising: data recovery sub-module and press-in stack top submodule; Wherein,
Described data recovery sub-module, for when hiding interface is opened, this hiding changing interface is current display interface, by the transferable data of the document form at this interface, returns in internal memory from user storage space;
Described press-in stack top submodule, for when hiding interface is opened, by the internal memory shared by the transferable data at this interface and this interface can not internal memory press-in stack top shared by transferring data.
11. memory management devices according to claim 10, is characterized in that, described data recovery sub-module, specifically for:
By the transferable data of the document form at this interface, return in the first internal memory from user storage space; Save as in described first: when this interface is first for current display interface, the internal memory shared by transferable data.
12. memory management devices according to claim 7, is characterized in that, described memory management device also comprises: internal memory release module; Wherein,
Described internal memory release module, for when the interface of the current display being positioned at stack top executes, what discharge the internal memory shared by transferable data at this interface and this interface can not internal memory shared by transferring data.
13. memory management devices according to claim 7, is characterized in that,
Described data memory module, the transferable data realizing described hiding interface specifically for being called default C/C++ function by local programming interface JNI are converted into document form and are stored in user storage space;
Described memory management module, specifically for:
When hiding interface is opened, this hiding changing interface is current display interface, calls default C/C++ function realize, by the transferable data of the document form at this interface, returning in internal memory from user storage space by local programming interface JNI; And by the internal memory shared by the transferable data at this interface and this interface can not internal memory press-in stack top shared by transferring data.
CN201510377466.8A 2015-06-30 2015-06-30 A kind of EMS memory management process and device of application program operational process Active CN104965708B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510377466.8A CN104965708B (en) 2015-06-30 2015-06-30 A kind of EMS memory management process and device of application program operational process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510377466.8A CN104965708B (en) 2015-06-30 2015-06-30 A kind of EMS memory management process and device of application program operational process

Publications (2)

Publication Number Publication Date
CN104965708A true CN104965708A (en) 2015-10-07
CN104965708B CN104965708B (en) 2018-09-28

Family

ID=54219742

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510377466.8A Active CN104965708B (en) 2015-06-30 2015-06-30 A kind of EMS memory management process and device of application program operational process

Country Status (1)

Country Link
CN (1) CN104965708B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105404551A (en) * 2015-12-11 2016-03-16 Tcl移动通信科技(宁波)有限公司 Processing method and system for switching application between foreground and background of mobile terminal and mobile terminal
CN105573811A (en) * 2015-12-15 2016-05-11 广州品唯软件有限公司 System internal memory control method and system thereof
CN105808447A (en) * 2016-03-29 2016-07-27 海信集团有限公司 Memory reclaiming method and device for terminal device
CN106980579A (en) * 2016-09-30 2017-07-25 阿里巴巴集团控股有限公司 A kind of picture loading method and device
CN107678780A (en) * 2017-10-26 2018-02-09 深圳乐信软件技术有限公司 A kind of EMS memory management process, device, storage medium and terminal device
CN105516782B (en) * 2015-12-10 2018-08-14 四川长虹电器股份有限公司 The realization method and system of android system smart television suspension interface mutual exclusion function
CN116737037A (en) * 2022-09-29 2023-09-12 荣耀终端有限公司 Stack management method in interface display and related device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102662867A (en) * 2012-04-16 2012-09-12 上海大亚科技有限公司 Method for achieving virtual memory dump control in application device flash memory of embedded system
CN103076944A (en) * 2013-01-05 2013-05-01 深圳市中兴移动通信有限公司 WEBOS (Web-based Operating System)-based application switching method and system and mobile handheld terminal
CN104407981A (en) * 2014-10-28 2015-03-11 小米科技有限责任公司 Method and device for managing internal memory

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102662867A (en) * 2012-04-16 2012-09-12 上海大亚科技有限公司 Method for achieving virtual memory dump control in application device flash memory of embedded system
CN103076944A (en) * 2013-01-05 2013-05-01 深圳市中兴移动通信有限公司 WEBOS (Web-based Operating System)-based application switching method and system and mobile handheld terminal
CN104407981A (en) * 2014-10-28 2015-03-11 小米科技有限责任公司 Method and device for managing internal memory

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105516782B (en) * 2015-12-10 2018-08-14 四川长虹电器股份有限公司 The realization method and system of android system smart television suspension interface mutual exclusion function
CN105404551A (en) * 2015-12-11 2016-03-16 Tcl移动通信科技(宁波)有限公司 Processing method and system for switching application between foreground and background of mobile terminal and mobile terminal
CN105573811A (en) * 2015-12-15 2016-05-11 广州品唯软件有限公司 System internal memory control method and system thereof
CN105573811B (en) * 2015-12-15 2018-12-07 广州品唯软件有限公司 Installed System Memory control method and its system
CN105808447A (en) * 2016-03-29 2016-07-27 海信集团有限公司 Memory reclaiming method and device for terminal device
CN105808447B (en) * 2016-03-29 2019-01-29 海信集团有限公司 A kind of method for recovering internal storage and device of terminal device
CN106980579A (en) * 2016-09-30 2017-07-25 阿里巴巴集团控股有限公司 A kind of picture loading method and device
US10719909B2 (en) 2016-09-30 2020-07-21 Alibaba Group Holding Limited Image loading method and device
CN107678780A (en) * 2017-10-26 2018-02-09 深圳乐信软件技术有限公司 A kind of EMS memory management process, device, storage medium and terminal device
CN116737037A (en) * 2022-09-29 2023-09-12 荣耀终端有限公司 Stack management method in interface display and related device

Also Published As

Publication number Publication date
CN104965708B (en) 2018-09-28

Similar Documents

Publication Publication Date Title
CN104965708A (en) Method and apparatus for managing memory in application program running process
US11340803B2 (en) Method for configuring resources, electronic device and computer program product
US10048865B2 (en) Disk partition stitching and rebalancing using a partition table
CN100432931C (en) Method for implementing long jumping dynamic patch in embedded system
US10394580B2 (en) Dynamic addition and removal of operating system components
US20100205606A1 (en) System and method for executing a complex task by sub-tasks
CN107562483A (en) A kind of method and device of carry guiding file system
CN102609467A (en) Method and device for database connection management
CN104035804A (en) Application integrating method and application integrating device
CN104267981A (en) Method and device for loading application layout on desktop
CN103970573A (en) Light application program system for mobile device and program loading system and method thereof
CN104184817A (en) Download optimizing method and device and terminal
CN103530180B (en) Method and device for switching storage space of application programs
US8281091B2 (en) Automatic selection of storage volumes in a data storage system
CN101685396A (en) System and method for controlling function icon
CN106896990A (en) The discharging method and device of a kind of application program
WO2017078132A1 (en) Mobile terminal and application program
CN107291512B (en) Application program multi-opening method and device, terminal equipment and storage medium
CN112162780A (en) Application operation control method and device and electronic equipment
CN106598551B (en) A kind for the treatment of method and apparatus of smart card, smart card
US8490105B2 (en) Pluggable component interface
US20130081007A1 (en) Providing continuous application availability during application update
CN105607912B (en) A kind of Java object distribution optimization method, device and equipment
CN111427550A (en) Object creating method, terminal device and storage medium
US7690007B2 (en) Mapping of dynamic link libraries in a computing device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant