CN105512050A - Memory management method and device - Google Patents

Memory management method and device Download PDF

Info

Publication number
CN105512050A
CN105512050A CN201510828476.9A CN201510828476A CN105512050A CN 105512050 A CN105512050 A CN 105512050A CN 201510828476 A CN201510828476 A CN 201510828476A CN 105512050 A CN105512050 A CN 105512050A
Authority
CN
China
Prior art keywords
memory
threshold
physical
virtual
physical memory
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
CN201510828476.9A
Other languages
Chinese (zh)
Other versions
CN105512050B (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 Xiaomi Technology Co Ltd
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201510828476.9A priority Critical patent/CN105512050B/en
Publication of CN105512050A publication Critical patent/CN105512050A/en
Application granted granted Critical
Publication of CN105512050B publication Critical patent/CN105512050B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System (AREA)

Abstract

The invention relates to a memory management method and device, pertaining to the field of computers. The method comprises following steps: monitoring physical memory and virtual memory of electronic equipment; increasing a memory management parameter of the physical memory when a first remaining memory is larger than a first threshold value and a second remaining memory of the virtual memory is smaller than or equal to a second threshold value, wherein the memory management parameter comprises intended use proportions or intended memory; and managing the physical memory and the virtual memory in order to increase use frequency of the physical memory and decrease use frequency of the virtual memory. The memory management method and device have following beneficial effects: when the method detects deficiency of the virtual memory and sufficiency of the physical memory, use frequency of the physical memory is increased while use frequency of the virtual memory is decreased so that usage efficiency of the overall memory space is improved.

Description

EMS memory management process and device
Technical field
The disclosure relates to computer realm, particularly relates to a kind of EMS memory management process and device.
Background technology
Along with the development of science and technology, the electronic apparatus application increasing extent such as computing machine, mobile phone, panel computer are extensive, and the problem of physical memory deficiency in use generally all can appear in these electronic equipments.For this problem, in the computing machine with Windows system, this system can be split a part of hard drive space and be used as virtual memory, thus solves the problem of physical memory deficiency.But for the electronic equipment that the memory headroom such as mobile phone, panel computer is very little, the safe digital card installed due to these electronic equipments is (English: SecureDigitalMemoryCard; SDcard) etc. be called for short: the erasable number of times of storage medium is limited, generally as virtual memory, therefore, can not need a kind of EMS memory management process for these electronic equipments badly.
In correlation technique, the memory headroom carried can be divided into two pieces of different regions by electronic equipment, and one piece of region is as physical memory, and another block region is as virtual memory.Afterwards, this electronic equipment can monitor the internal memory of use of physical memory, or the running memory needed for application program of this physical memory of monitoring current accessed, when this has used ratio shared in total internal memory of interior this physical memory of existence to be greater than appointment usage ratio, or when this running memory is greater than specified memory, this electronic equipment can choice for use frequency is lower from this physical memory data, and by the data conversion storage selected in virtual memory, thus realize the management of internal memory.Wherein, this appointment usage ratio and this specified memory are the preset parameters arranged in advance.
Summary of the invention
For overcoming Problems existing in correlation technique, the disclosure provides a kind of EMS memory management process and device.
According to the first aspect of disclosure embodiment, provide a kind of EMS memory management process, described method comprises:
The physical memory of monitoring electronic equipment and virtual memory;
When the first free memory of described physical memory is greater than first threshold and the second free memory of described virtual memory is less than or equal to Second Threshold, increase the memory management parameter of described physical memory, described memory management parameter comprises specifies usage ratio or specified memory;
Based on the memory management parameter after increasing, described physical memory and described virtual memory are managed, to increase the use of described physical memory and to reduce the use of described virtual memory.
In conjunction with first aspect, in the first possible implementation of above-mentioned first aspect, before the physical memory of described monitoring electronic equipment and virtual memory, also comprise:
The memory headroom of described electronic equipment is divided into described physical memory and described virtual memory;
The first threshold of described physical memory and the Second Threshold of described virtual memory are set.
In conjunction with first aspect, in the implementation that the second of above-mentioned first aspect is possible, described method also comprises:
When described first free memory is less than or equal to described first threshold and described second free memory is greater than described Second Threshold, reduce described memory management parameter, to reduce the use of described physics and to increase the use of described virtual memory.
In conjunction with first aspect, in the third possible implementation of above-mentioned first aspect, described method also comprises:
When described first free memory is less than or equal to described first threshold and described second free memory is less than or equal to described Second Threshold, display reminding information, described information is for pointing out memory headroom not enough.
According to the second aspect of disclosure embodiment, provide a kind of memory management device, described device comprises:
Monitoring modular, for monitoring physical memory and the virtual memory of electronic equipment;
Increase module, for when the first free memory of described physical memory is greater than first threshold and the second free memory of described virtual memory is less than or equal to Second Threshold, increase the memory management parameter of described physical memory, described memory management parameter comprises specifies usage ratio or specified memory;
Administration module, for based on the memory management parameter after increasing, manages described physical memory and described virtual memory, to increase the use of described physical memory and to reduce the use of described virtual memory.
In conjunction with second aspect, in the first possible implementation of above-mentioned second aspect, described device also comprises:
Divide module, for the memory headroom of described electronic equipment is divided into described physical memory and described virtual memory;
Module is set, for the Second Threshold of the first threshold and described virtual memory that arrange described physical memory.
In conjunction with second aspect, in the implementation that the second of above-mentioned second aspect is possible, described device also comprises:
Reduce module, for when described first free memory is less than or equal to described first threshold and described second free memory is greater than described Second Threshold, reduce described memory management parameter, to reduce the use of described physics and to increase the use of described virtual memory.
In conjunction with second aspect, in the third possible implementation of above-mentioned second aspect, described device also comprises:
Display module, for when described first free memory is less than or equal to described first threshold and described second free memory is less than or equal to described Second Threshold, display reminding information, described information is for pointing out memory headroom not enough.
According to the third aspect of disclosure embodiment, provide a kind of memory management device, described device comprises:
Processor;
For the storer of storage of processor executable instruction;
Wherein, described processor is configured to:
The physical memory of monitoring electronic equipment and virtual memory;
When the first free memory of described physical memory is greater than first threshold and the second free memory of described virtual memory is less than or equal to Second Threshold, increase the memory management parameter of described physical memory, described memory management parameter comprises specifies usage ratio or specified memory;
Based on the memory management parameter after increasing, described physical memory and described virtual memory are managed, to increase the use of described physical memory and to reduce the use of described virtual memory.
The technical scheme that embodiment of the present disclosure provides can comprise following beneficial effect: disclosure embodiment passes through first threshold and the Second Threshold of this electronic equipment, and monitor physical memory and the virtual memory of this electronic equipment, when monitoring the Insufficient virtual memory of this electronic equipment and this physical memory is sufficient, increase this memory management parameter, to increase the use of this physical memory and to reduce the use of this virtual memory, decrease the excessive use to virtual memory, improve the service efficiency of memory headroom entirety.
Should be understood that, it is only exemplary and explanatory that above general description and details hereinafter describe, and can not limit the disclosure.
Accompanying drawing explanation
Accompanying drawing to be herein merged in instructions and to form the part of this instructions, shows embodiment according to the invention, and is used from instructions one and explains principle of the present invention.
Fig. 1 is the process flow diagram of a kind of EMS memory management process according to an exemplary embodiment.
Fig. 2 is the process flow diagram of the another kind of EMS memory management process according to an exemplary embodiment.
Fig. 3 is the structured flowchart of a kind of memory management device according to an exemplary embodiment.
Fig. 4 is the block diagram of a kind of memory management device according to an exemplary embodiment.
Fig. 5 is the block diagram of the another kind of memory management device according to an exemplary embodiment.
Fig. 6 is the block diagram of another the memory management device according to an exemplary embodiment.
Embodiment
Here will be described exemplary embodiment in detail, its sample table shows in the accompanying drawings.When description below relates to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawing represents same or analogous key element.Embodiment described in following exemplary embodiment does not represent all embodiments consistent with the present invention.On the contrary, they only with as in appended claims describe in detail, the example of apparatus and method that aspects more of the present invention are consistent.
Fig. 1 is the process flow diagram of a kind of EMS memory management process according to an exemplary embodiment, and the method is used in electronic equipment, and as shown in Figure 1, the method comprises the following steps.
In a step 101, physical memory and the virtual memory of electronic equipment is monitored.
In a step 102, when the first free memory of this physical memory is greater than first threshold and the second free memory of this virtual memory is less than or equal to Second Threshold, increase the memory management parameter of this physical memory, this memory management parameter comprises specifies usage ratio or specified memory.
In step 103, based on the memory management parameter after increasing, this physical memory and this virtual memory are managed, to increase the use of this physical memory and to reduce the use of this virtual memory.
Disclosure embodiment passes through first threshold and the Second Threshold of this electronic equipment, and monitor physical memory and the virtual memory of this electronic equipment, when monitoring the Insufficient virtual memory of this electronic equipment and this physical memory is sufficient, increase this memory management parameter, to increase the use of this physical memory and to reduce the use of this virtual memory, decrease the excessive use to virtual memory, improve the service efficiency of memory headroom entirety.
In another embodiment of the present disclosure, before the monitoring physical memory of electronic equipment and virtual memory, also comprise:
The memory headroom of this electronic equipment is divided into this physical memory and this virtual memory;
The first threshold of this physical memory and the Second Threshold of this virtual memory are set.
In another embodiment of the present disclosure, the method also comprises:
When this first free memory is less than or equal to this first threshold and this second free memory is greater than this Second Threshold, reduce this memory management parameter, to reduce the use of this physics and to increase the use of this virtual memory.
In another embodiment of the present disclosure, the method also comprises:
When this first free memory is less than or equal to this first threshold and this second free memory is less than or equal to this Second Threshold, display reminding information, this information is for pointing out memory headroom not enough.
Above-mentioned all alternatives, all can form embodiment of the present disclosure according to combining arbitrarily, disclosure embodiment repeats no longer one by one to this.
Fig. 2 is the process flow diagram of the another kind of EMS memory management process according to an exemplary embodiment, and the method is used in electronic equipment, and as shown in Figure 2, the method comprises the following steps.
In step 201, the memory headroom of this electronic equipment is divided into physical memory and virtual memory.
The memory headroom of the electronic equipments such as mobile phone is smaller; often there will be the lower data of frequency of utilization occupy memory headroom and cause the phenomenon of low memory; and in order to releasing memory space; ensure the Appropriate application of memory headroom; improve the service efficiency to memory headroom entirety; the memory headroom of this electronic equipment can be divided physical memory and virtual memory; and by unloading after data compression lower for frequency of utilization in physical memory in virtual memory, thus a part of memory headroom can be discharged by data compression.
Wherein, when the memory headroom of this electronic equipment is divided into physical memory and virtual memory, general virtual memory can be greater than physical memory, certainly, also physical memory can be less than or equal to, in practical application, can divide physical memory and virtual memory according to the actual requirements, disclosure embodiment is not specifically limited this.
It should be noted that, can with reference to correlation technique by unloading after data compression lower for frequency of utilization in physical memory to the method for virtual memory, disclosure embodiment repeats no more this.
Such as, the memory headroom of this electronic equipment is 600M, this memory headroom is divided into the physical memory of 250M and the virtual memory of 350M, the unpressed data of 250M can be stored in this physical memory, and the data after 350M compression can be stored in this virtual memory.
In step 202., the first threshold of this physical memory and the Second Threshold of this virtual memory are set.
After the physical memory of electronic equipment or virtual memory are used up, again the memory headroom of this electronic equipment is managed, may the operation of application program be caused to make mistakes because of physical memory or Insufficient virtual memory, therefore, after this electronic equipment divides physical memory and virtual memory, need to arrange the first threshold of this physical memory and the Second Threshold of this virtual memory, can know that physical memory is about to deficiency in advance by first threshold, and also can know that virtual memory is about to deficiency in advance by Second Threshold.That is to say, when remaining physical memory is less than or equal to this first threshold, namely illustrates that the physical memory of this electronic equipment is not enough, when remaining virtual memory is less than or equal to this Second Threshold, namely the Insufficient virtual memory of this electronic equipment is described.
Wherein, this first threshold and Second Threshold can be arrange when dividing physical memory and virtual memory, also can be arrange after division physical memory and virtual memory, as long as first threshold and Second Threshold carried out arranging before memory management, disclosure embodiment is not specifically limited the opportunity that arranges to first threshold and Second Threshold.
It should be noted that, this first threshold and Second Threshold can be that this electronic equipment normally runs required minimal physical internal memory and virtual memory when not installing any application program.
When the memory headroom of this electronic equipment is divided into physical memory and virtual memory, and after being provided with first threshold and Second Threshold, need the behaviour in service of monitoring this electronic equipment, determine that this electronic equipment is physical memory deficiency or Insufficient virtual memory, thus memory headroom is managed, as described below.
In step 203, physical memory and the virtual memory of electronic equipment is monitored.
Because the service condition moment of physical memory in electronic equipment and virtual memory is all changing, therefore, in order to can at physical memory during not enough or Insufficient virtual memory, this memory management parameter is adjusted in time, need physical memory and the virtual memory of this electronic equipment of Real-Time Monitoring, thus determine the first free memory of physical memory and the second free memory of virtual memory in real time.
Wherein, when monitoring physical memory and the virtual memory of this electronic equipment, not only can monitor the first free memory of physical memory and the second free memory of virtual memory, the application program that the space taking physical memory exceedes this specified memory can also be monitored, or the application program that monitoring running frequency is lower, disclosure embodiment is not specifically limited this.
It should be noted that, specified memory can be arranged in advance, and such as, specified memory is 100M, and disclosure embodiment is not specifically limited this.
In step 204, when the first free memory of this physical memory is greater than first threshold and the second free memory of this virtual memory is less than or equal to Second Threshold, increase this memory management parameter, based on the memory management parameter after increase, this physical memory and virtual memory are managed, to increase the use of physical memory and to reduce the use of virtual memory, this memory management parameter comprises specifies usage ratio or specified memory.
When the first free memory of this physical memory is greater than first threshold and the second free memory of this virtual memory is less than or equal to Second Threshold, namely the Insufficient virtual memory of this electronic equipment is described, and physical memory is sufficient, now can increase this memory management parameter, and based on the memory management parameter after increase, this physical memory and virtual memory are managed, to increase the use of physical memory and to reduce the use of virtual memory.
Wherein, the operation increasing this memory management parameter can be: when this memory management parameter comprises appointment usage ratio, can increase this appointment usage ratio; And when this memory management parameter comprises specified memory, this specified memory can be increased.
It should be noted that, this appointment usage ratio is for characterizing the ratio using memory size shared in total memory size of this physical memory of this physical memory, this specified memory is for characterizing the memory size needed for the application program of accessing this physical memory, and this appointment usage ratio and this specified memory can be pre-set according to personal habits by user, disclosure embodiment does not do concrete restriction to this.
Also it should be noted that, when increasing this memory management parameter, the first free memory that this electronic equipment often can monitor this physical memory be greater than first threshold and the second free memory of this virtual memory is less than or equal to Second Threshold time, this memory management parameter is increased fixed numbers, this fixed numbers can be preset by user, also can be preset by this electronic equipment; Certainly, the first free memory that this electronic equipment often can also monitor this physical memory be greater than first threshold and the second free memory of this virtual memory is less than or equal to Second Threshold time, be set by the user this memory management parameter, to increase this memory management parameter.
Wherein, presetting by user or this electronic equipment the fixed numbers that this memory management parameter increases at every turn, this electronic equipment can being made more steady when adjusting physical memory and virtual memory, and the first free memory often monitoring this physical memory is greater than first threshold and the second free memory of this virtual memory is less than or equal to Second Threshold time, be set by the user this memory management parameter, this electronic equipment can be made rapider when adjusting physical memory and virtual memory, but when user sets the memory management parameter of mistake, such as, this appointment usage ratio is set as the numerical value beyond 0-100% by user, or this specified memory is set as the value exceeding this electronic equipment physical memory by user, at this moment possibly cannot play the use increasing physical memory and reduce the effect that virtual memory is used, even this electronic equipment may run and make mistakes, therefore, in practical application, can arrange for different demands.
It should be noted that, this electronic equipment is based on the memory management parameter after increase, and the method managed this physical memory and virtual memory can with reference to correlation technique, and disclosure embodiment is no longer described in detail this.
In the disclosed embodiments, memory management device can be electronic equipment, this electronic equipment can comprise Java layer strategic control module, core layer (English: Kernel) memory configurations and monitoring modular and Java local interface middle layer (English: JavaNativeInterface; Be called for short: Jni) module.Java layer strategic control module can receive the event of the not enough or Insufficient virtual memory of physical memory that Kernel layer reports by Jni middle layer module, determined to increase or reduce memory management parameter by the type of event and other policy information, then inform application layer Configuration Manager by Jni middle layer module.Kernel layer memory configurations and monitoring modular receive Java layer strategic control module can issue first threshold and Second Threshold when initialization, when monitoring the first free memory and be less than or equal to first threshold and the second free memory being greater than Second Threshold, namely report the event of physical memory deficiency to Java layer strategic control module; When discovery second free memory is less than or equal to Second Threshold and the first free memory is greater than first threshold, namely report the event of Insufficient virtual memory to Java layer strategic control module.Jni middle layer module is the interface layer mutually calling between the program based on C language and the program based on Java language and communicate, the interface that Jni middle layer module achieves Java layer strategic control module and Kenerl layer memory configurations and monitoring modular, application layer Configuration Manager communicates.Application layer Configuration Manager, according to the instruction of java layer strategic control module, increases memory management parameter or reduces memory management parameter.Such as, as shown in Figure 3, when Kernel layer memory configurations and monitoring module monitors to the first free memory be greater than first threshold and the second free memory is less than or equal to Second Threshold time, report physical memory sufficient and Insufficient virtual memory by Jni middle layer module to Java layer strategic control module, by Jni middle layer module, Java layer strategic control module informs that application layer Configuration Manager increases memory management parameter, when this memory management parameter comprises appointment usage ratio, application layer Configuration Manager increases this appointment usage ratio; When this memory management parameter comprises specified memory, increase this specified memory, to increase the use of physical memory and to reduce the use of virtual memory.
Such as, this electronic equipment memory headroom is physical memory 250M, virtual memory 350M, and arranging first threshold is 50M, and Second Threshold is 70M, and current appointment usage ratio is 80%, and specified memory is 200M.When monitoring that the first free memory is 210M, the second free memory is 40M, namely the first free memory is greater than first threshold and the second free memory is less than Second Threshold, illustrate this electronic equipment physical memory sufficient and Insufficient virtual memory, therefore this appointment usage ratio is increased to 85% by 80%, or this specified memory is increased to 230M by 200M, so can reduces this electronic equipment to the use of virtual memory and increase use to physical memory.
In step 205, when the first free memory of this physical memory is less than or equal to first threshold and the second free memory of this virtual memory is greater than Second Threshold, reduce this memory management parameter, to reduce the use of physics and to increase the use of virtual memory.
When this first free memory is less than or equal to this first threshold and this second free memory is greater than this Second Threshold, namely illustrate that the physical memory of this electronic equipment is not enough, and virtual memory is sufficient, now, this electronic equipment can reduce this memory management parameter, to increase the use of virtual memory and the use reduced physical memory.
Wherein, the operation reducing this memory management parameter can be: when this memory management parameter comprises appointment usage ratio, can reduce this appointment usage ratio; And when this memory management parameter comprises specified memory, this specified memory can be reduced.
It should be noted that, when reducing this memory management parameter, the first free memory that this electronic equipment often can monitor this physical memory be less than or equal to first threshold and the second free memory of this virtual memory is greater than Second Threshold time, this memory management parameter is reduced fixed numbers, this fixed numbers can be preset by user, also can be preset by this electronic equipment; Certainly, the first free memory that this electronic equipment often can also monitor this physical memory be less than or equal to first threshold and the second free memory of this virtual memory is greater than Second Threshold time, be set by the user this memory management parameter, to reduce this memory management parameter.
Such as, be 30M when monitoring this electronic equipment first free memory, when second free memory is 190M, namely the first free memory is less than first threshold and the second free memory is greater than Second Threshold, the virtual memory abundance of this electronic equipment is described and physical memory is not enough, therefore this designated ratio is reduced to 75% by 80%, or this specified memory is reduced to 170M, so can increase this electronic equipment to the use of virtual memory and reduce use to physical memory.
In step 206, when this first free memory is less than or equal to this first threshold and this second free memory is less than or equal to this Second Threshold, display reminding information, this information is for pointing out memory headroom not enough.
When this first free memory is less than or equal to this first threshold and this second free memory is less than or equal to this Second Threshold, namely illustrate that physical memory and the virtual memory of this electronic equipment are all not enough, now, this electronic equipment can display reminding information, to point out the memory headroom of this electronic equipment of user not enough.
Wherein, when showing this information, this electronic equipment can also show the application program identification taking physical memory and exceed this specified memory, or the application program identification that running frequency is lower, make some malice virus applications of committed memory of user's Timeliness coverage or the very low application of some frequency of utilization, thus delete this application, improve the service efficiency of internal memory.
It should be noted that, the mode showing this information can be by playing window display, window display, or other modes show, and disclosure embodiment does not do concrete restriction to this.
In addition, application program identification is used for this application program of unique identification, and this application program identification can be the title, icon etc. of this application program, and disclosure embodiment is not specifically limited this.
Such as, be 30M when monitoring this electronic equipment first free memory, when second free memory is 40M, namely the first free memory is less than first threshold and the second free memory is less than Second Threshold, illustrate this electronic equipment virtual memory and physical memory all not enough, display reminding information, prompting user memory is not enough.
Disclosure embodiment passes through first threshold and the Second Threshold of this electronic equipment, and monitor physical memory and the virtual memory of this electronic equipment, when monitoring the Insufficient virtual memory of this electronic equipment and this physical memory is sufficient, increase this memory management parameter, to increase the use of this physical memory and to reduce the use of this virtual memory, improve the service efficiency of physical memory, avoid the waste of physical memory resource; When monitoring this electronic equipment physical memory and be not enough and this virtual memory being sufficient, reduce this memory management parameter, to reduce the use of this physical memory and the use increased this virtual memory, avoid because physical memory is not enough and new application program cannot be run, alleviate the problem of electronic equipment low memory better, Appropriate application is carried out to memory headroom, has improve the service efficiency of memory headroom entirety.
Fig. 4 is the block diagram of a kind of memory management device according to an exemplary embodiment.As shown in Figure 4, this device comprises monitoring modular 401, increases module 402 and administration module 303.
Monitoring modular 401, for monitoring physical memory and the virtual memory of electronic equipment;
Increase module 402, for when the first free memory of this physical memory is greater than first threshold and the second free memory of this virtual memory is less than or equal to Second Threshold, increase the memory management parameter of this physical memory, this memory management parameter comprises specifies usage ratio or specified memory;
Administration module 403, for based on the memory management parameter after increasing, manages this physical memory and this virtual memory, to increase the use of this physical memory and to reduce the use of this virtual memory.
In another embodiment of the present disclosure, as shown in Figure 5, this device also comprises division module 404 and arranges module 405.
Divide module 404, for the memory headroom of this electronic equipment being divided into this physical memory and this virtual memory;
Module 405 is set, for the Second Threshold of the first threshold He this virtual memory that arrange this physical memory.
In another embodiment of the present disclosure, this device also comprises the second adjusting module 306.
Second adjusting module 406, for when this first free memory is less than or equal to this first threshold and this second free memory is greater than this Second Threshold, reduces this memory management parameter, to reduce the use of this physics and to increase the use of this virtual memory.
In another embodiment of the present disclosure, this device also comprises display module 407.
Display module 407, for when this first free memory is less than or equal to this first threshold and this second free memory is less than or equal to this Second Threshold, display reminding information, this information is for pointing out memory headroom not enough.
Disclosure embodiment passes through first threshold and the Second Threshold of this electronic equipment, and monitor physical memory and the virtual memory of this electronic equipment, when monitoring the Insufficient virtual memory of this electronic equipment and this physical memory is sufficient, increase this memory management parameter, to increase the use of this physical memory and to reduce the use of this virtual memory, improve the service efficiency of physical memory, avoid the waste of physical memory resource.
About the device in above-described embodiment, wherein the concrete mode of modules executable operations has been described in detail in about the embodiment of the method, will not elaborate explanation herein.
Fig. 6 is a kind of block diagram for memory management device 600 according to an exemplary embodiment.Such as, device 600 can be mobile phone, computing machine, digital broadcast terminal, messaging devices, game console, tablet device, Medical Devices, body-building equipment, personal digital assistant etc.
With reference to Fig. 6, device 600 can comprise following one or more assembly: processing components 602, storer 604, power supply module 606, multimedia groupware 608, audio-frequency assembly 610, the interface 612 of I/O (I/O), sensor module 614, and communications component 616.
The integrated operation of the usual control device 600 of processing components 602, such as with display, call, data communication, camera operation and record operate the operation be associated.Treatment element 602 can comprise one or more processor 620 to perform instruction, to complete all or part of step of above-mentioned method.In addition, processing components 602 can comprise one or more module, and what be convenient between processing components 602 and other assemblies is mutual.Such as, processing element 602 can comprise multi-media module, mutual with what facilitate between multimedia groupware 608 and processing components 602.
Storer 604 is configured to store various types of data to be supported in the operation of equipment 600.The example of these data comprises for any application program of operation on device 600 or the instruction of method, contact data, telephone book data, message, picture, video etc.Storer 604 can be realized by the volatibility of any type or non-volatile memory device or their combination, as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), ROM (read-only memory) (ROM), magnetic store, flash memory, disk or CD.
The various assemblies that electric power assembly 606 is device 600 provide electric power.Electric power assembly 606 can comprise power-supply management system, one or more power supply, and other and the assembly generating, manage and distribute electric power for device 600 and be associated.
Multimedia groupware 608 is included in the screen providing an output interface between described device 600 and user.In certain embodiments, screen can comprise liquid crystal display (LCD) and touch panel (TP).If screen comprises touch panel, screen may be implemented as touch-screen, to receive the input signal from user.Touch panel comprises one or more touch sensor with the gesture on sensing touch, slip and touch panel.Described touch sensor can the border of not only sensing touch or sliding action, but also detects the duration relevant to described touch or slide and pressure.In certain embodiments, multimedia groupware 608 comprises a front-facing camera and/or post-positioned pick-up head.When equipment 600 is in operator scheme, during as screening-mode or video mode, front-facing camera and/or post-positioned pick-up head can receive outside multi-medium data.Each front-facing camera and post-positioned pick-up head can be fixing optical lens systems or have focal length and optical zoom ability.
Audio-frequency assembly 610 is configured to export and/or input audio signal.Such as, audio-frequency assembly 610 comprises a microphone (MIC), and when device 600 is in operator scheme, during as call model, logging mode and speech recognition mode, microphone is configured to receive external audio signal.The sound signal received can be stored in storer 604 further or be sent via communications component 616.In certain embodiments, audio-frequency assembly 610 also comprises a loudspeaker, for output audio signal.
I/O interface 612 is for providing interface between processing components 602 and peripheral interface module, and above-mentioned peripheral interface module can be keyboard, some striking wheel, button etc.These buttons can include but not limited to: home button, volume button, start button and locking press button.
Sensor module 614 comprises one or more sensor, for providing the state estimation of various aspects for device 600.Such as, sensor module 614 can detect the opening/closing state of equipment 600, the relative positioning of assembly, such as described assembly is display and the keypad of device 600, the position of all right pick-up unit 600 of sensor module 614 or device 600 1 assemblies changes, the presence or absence that user contacts with device 600, the temperature variation of device 600 orientation or acceleration/deceleration and device 600.Sensor module 614 can comprise proximity transducer, be configured to without any physical contact time detect near the existence of object.Sensor module 614 can also comprise optical sensor, as CMOS or ccd image sensor, for using in imaging applications.In certain embodiments, this sensor module 614 can also comprise acceleration transducer, gyro sensor, Magnetic Sensor, pressure transducer or temperature sensor.
Communications component 616 is configured to the communication being convenient to wired or wireless mode between device 600 and other equipment.Device 600 can access the wireless network based on communication standard, as WiFi, 2G or 3G, or their combination.In one exemplary embodiment, communication component 616 receives from the broadcast singal of external broadcasting management system or broadcast related information via broadcast channel.In one exemplary embodiment, described communication component 616 also comprises near-field communication (NFC) module, to promote junction service.Such as, can based on radio-frequency (RF) identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 600 can be realized, for performing said method by one or more application specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD) (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components.
In the exemplary embodiment, additionally provide a kind of non-transitory computer-readable recording medium comprising instruction, such as, comprise the storer 604 of instruction, above-mentioned instruction can perform said method by the processor 620 of device 600.Such as, described non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc.
A kind of non-transitory computer-readable recording medium, when the instruction in described storage medium is performed by the processor of mobile terminal, make mobile terminal can perform a kind of EMS memory management process, described method comprises:
The physical memory of monitoring electronic equipment and virtual memory;
When the first free memory of this physical memory is greater than first threshold and the second free memory of this virtual memory is less than or equal to Second Threshold, increase the memory management parameter of this physical memory, this memory management parameter comprises specifies usage ratio or specified memory;
Based on the memory management parameter after increasing, this physical memory and this virtual memory are managed, to increase the use of this physical memory and to reduce the use of this virtual memory.
In another embodiment of the present disclosure, before the monitoring physical memory of electronic equipment and virtual memory, also comprise:
The memory headroom of this electronic equipment is divided into this physical memory and this virtual memory;
The first threshold of this physical memory and the Second Threshold of this virtual memory are set.
In another embodiment of the present disclosure, the method also comprises:
When this first free memory is less than or equal to this first threshold and this second free memory is greater than this Second Threshold, reduce this memory management parameter, to reduce the use of this physics and to increase the use of this virtual memory.
In another embodiment of the present disclosure, the method also comprises:
When this first free memory is less than or equal to this first threshold and this second free memory is less than or equal to this Second Threshold, display reminding information, this information is for pointing out memory headroom not enough.
Disclosure embodiment is by arranging first threshold and the Second Threshold of this electronic equipment, and monitor physical memory and the virtual memory of this electronic equipment, when monitoring the Insufficient virtual memory of this electronic equipment and this physical memory is sufficient, increase this memory management parameter, to increase the use of this physical memory and to reduce the use of this virtual memory, decrease the excessive use to virtual memory, improve the service efficiency of memory headroom entirety.
Those skilled in the art, at consideration instructions and after putting into practice invention disclosed herein, will easily expect other embodiment of the present invention.The application is intended to contain any modification of the present invention, purposes or adaptations, and these modification, purposes or adaptations are followed general principle of the present invention and comprised the undocumented common practise in the art of the disclosure or conventional techniques means.Instructions and embodiment are only regarded as exemplary, and true scope of the present invention and spirit are pointed out by claim below.
Should be understood that, the disclosure is not limited to precision architecture described above and illustrated in the accompanying drawings, and can carry out various amendment and change not departing from its scope.The scope of the present disclosure is only limited by appended claim.

Claims (9)

1. an EMS memory management process, is characterized in that, described method comprises:
The physical memory of monitoring electronic equipment and virtual memory;
When the first free memory of described physical memory is greater than first threshold and the second free memory of described virtual memory is less than or equal to Second Threshold, increase the memory management parameter of described physical memory, described memory management parameter comprises specifies usage ratio or specified memory;
Based on the memory management parameter after increasing, described physical memory and described virtual memory are managed, to increase the use of described physical memory and to reduce the use of described virtual memory.
2. the method for claim 1, is characterized in that, before the physical memory of described monitoring electronic equipment and virtual memory, also comprises:
The memory headroom of described electronic equipment is divided into described physical memory and described virtual memory;
The first threshold of described physical memory and the Second Threshold of described virtual memory are set.
3. method as claimed in claim 1 or 2, it is characterized in that, described method also comprises:
When described first free memory is less than or equal to described first threshold and described second free memory is greater than described Second Threshold, reduce described memory management parameter, to reduce the use of described physics and to increase the use of described virtual memory.
4. method as claimed in claim 1 or 2, it is characterized in that, described method also comprises:
When described first free memory is less than or equal to described first threshold and described second free memory is less than or equal to described Second Threshold, display reminding information, described information is for pointing out memory headroom not enough.
5. a memory management device, is characterized in that, described device comprises:
Monitoring modular, for monitoring physical memory and the virtual memory of electronic equipment;
Increase module, for when the first free memory of described physical memory is greater than first threshold and the second free memory of described virtual memory is less than or equal to Second Threshold, increase the memory management parameter of described physical memory, described memory management parameter comprises specifies usage ratio or specified memory;
Administration module, for based on the memory management parameter after increasing, manages described physical memory and described virtual memory, to increase the use of described physical memory and to reduce the use of described virtual memory.
6. device as claimed in claim 5, it is characterized in that, described device also comprises:
Divide module, for the memory headroom of described electronic equipment is divided into described physical memory and described virtual memory;
Module is set, for the Second Threshold of the first threshold and described virtual memory that arrange described physical memory.
7. the device as described in claim 5 or 6, is characterized in that, described device also comprises:
Reduce module, for when described first free memory is less than or equal to described first threshold and described second free memory is greater than described Second Threshold, reduce described memory management parameter, to reduce the use of described physics and to increase the use of described virtual memory.
8. the device as described in claim 5 or 6, is characterized in that, described device also comprises:
Display module, for when described first free memory is less than or equal to described first threshold and described second free memory is less than or equal to described Second Threshold, display reminding information, described information is for pointing out memory headroom not enough.
9. a memory management device, is characterized in that, described device comprises:
Processor;
For the storer of storage of processor executable instruction;
Wherein, described processor is configured to:
The physical memory of monitoring electronic equipment and virtual memory;
When the first free memory of described physical memory is greater than first threshold and the second free memory of described virtual memory is less than or equal to Second Threshold, increase the memory management parameter of described physical memory, described memory management parameter comprises specifies usage ratio or specified memory;
Based on the memory management parameter after increasing, described physical memory and described virtual memory are managed, to increase the use of described physical memory and to reduce the use of described virtual memory.
CN201510828476.9A 2015-11-25 2015-11-25 EMS memory management process and device Active CN105512050B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510828476.9A CN105512050B (en) 2015-11-25 2015-11-25 EMS memory management process and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510828476.9A CN105512050B (en) 2015-11-25 2015-11-25 EMS memory management process and device

Publications (2)

Publication Number Publication Date
CN105512050A true CN105512050A (en) 2016-04-20
CN105512050B CN105512050B (en) 2018-09-04

Family

ID=55720051

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510828476.9A Active CN105512050B (en) 2015-11-25 2015-11-25 EMS memory management process and device

Country Status (1)

Country Link
CN (1) CN105512050B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107506237A (en) * 2017-07-07 2017-12-22 杭州联吉技术有限公司 A kind of web camera and its memory scrubbing method and apparatus
WO2018000128A1 (en) * 2016-06-27 2018-01-04 Intel Corporation Dynamic configuration of compressed virtual memory
CN108073520A (en) * 2016-11-10 2018-05-25 腾讯科技(深圳)有限公司 A kind of internal memory control method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102193814A (en) * 2010-03-09 2011-09-21 上海拜翰网络科技有限公司 Method and system for dynamically distributing embedded virtual memory
US20140068610A1 (en) * 2012-09-06 2014-03-06 Marek Baluch Method and system for adjusting the operating memory used by a java virtual machine during runtime
CN103874987A (en) * 2012-10-15 2014-06-18 华为终端有限公司 Embedded multimedia card partition memory space adjustment method and terminal
CN103870544A (en) * 2014-02-25 2014-06-18 小米科技有限责任公司 Method and device for virtually operating file, and electronic equipment
CN104881241A (en) * 2014-02-28 2015-09-02 华为技术有限公司 Swap operation implementation method and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102193814A (en) * 2010-03-09 2011-09-21 上海拜翰网络科技有限公司 Method and system for dynamically distributing embedded virtual memory
US20140068610A1 (en) * 2012-09-06 2014-03-06 Marek Baluch Method and system for adjusting the operating memory used by a java virtual machine during runtime
CN103874987A (en) * 2012-10-15 2014-06-18 华为终端有限公司 Embedded multimedia card partition memory space adjustment method and terminal
CN103870544A (en) * 2014-02-25 2014-06-18 小米科技有限责任公司 Method and device for virtually operating file, and electronic equipment
CN104881241A (en) * 2014-02-28 2015-09-02 华为技术有限公司 Swap operation implementation method and apparatus

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018000128A1 (en) * 2016-06-27 2018-01-04 Intel Corporation Dynamic configuration of compressed virtual memory
US10635337B2 (en) 2016-06-27 2020-04-28 Intel Corporation Dynamic configuration of compressed virtual memory
CN108073520A (en) * 2016-11-10 2018-05-25 腾讯科技(深圳)有限公司 A kind of internal memory control method and device
CN108073520B (en) * 2016-11-10 2021-09-14 腾讯科技(深圳)有限公司 Memory control method and device
CN107506237A (en) * 2017-07-07 2017-12-22 杭州联吉技术有限公司 A kind of web camera and its memory scrubbing method and apparatus

Also Published As

Publication number Publication date
CN105512050B (en) 2018-09-04

Similar Documents

Publication Publication Date Title
EP3188066B1 (en) A method and an apparatus for managing an application
CN104503740A (en) Memory management method and device
CN104239094A (en) Method and device for controlling background application programs and terminal equipment
CN104881104A (en) Intelligent equipment, intelligent equipment performance improvement method and intelligent equipment performance improvement device
CN105244048A (en) Audio play control method and apparatus
CN104219388A (en) Voice control method and device
CN105204846A (en) Method for displaying video picture in multi-user video, device and terminal equipment
CN105306718A (en) Event prompting method and device
CN104793846A (en) Displaying method and device for interface of application program
CN105120337A (en) Video special effect processing method, video special effect processing device and terminal equipment
CN105404382A (en) Power saving mode setting method and apparatus
CN105159559A (en) Mobile terminal control method and mobile terminal
CN105224349A (en) The deletion reminding method of application program and device
CN104766005A (en) Management method and device for application software access authority
CN105183132A (en) Energy conservation mode starting method and apparatus
CN104298547A (en) Terminal setting method and device
CN105528055A (en) Running object processing method and device
CN104331220A (en) Unlocking processing method and device
CN104331237A (en) Method and device for starting application programs
CN105786507A (en) Display interface switching method and device
CN105430715A (en) Method and apparatus for controlling WIFI scanning
CN105224171A (en) icon display method, device and terminal
CN105163290A (en) Roaming prompting method and apparatus
CN104811821A (en) Drawing display frame rate adjusting method and device
CN106021072A (en) Information display method and 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