CN105512050B - EMS memory management process and device - Google Patents

EMS memory management process and device Download PDF

Info

Publication number
CN105512050B
CN105512050B CN201510828476.9A CN201510828476A CN105512050B CN 105512050 B CN105512050 B CN 105512050B CN 201510828476 A CN201510828476 A CN 201510828476A CN 105512050 B CN105512050 B CN 105512050B
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.)
Active
Application number
CN201510828476.9A
Other languages
Chinese (zh)
Other versions
CN105512050A (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.)
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 disclosure is directed to a kind of EMS memory management process and devices, belong to computer realm.The method includes:Monitor the physical memory and virtual memory of electronic equipment;When the first free memory of the physical memory is more than the second free memory of first threshold and the virtual memory less than or equal to second threshold, increase the memory management parameter of the physical memory, the memory management parameter includes specified use ratio or specified memory;Based on the memory management parameter after increase, the physical memory and the virtual memory are managed, to increase the use of the physical memory and reduce the use of the virtual memory.The disclosure increases memory management parameter and improves the service efficiency of memory headroom entirety to increase the use of the physical memory and reduce the use of the virtual memory when monitoring the Insufficient virtual memory and the physical memory abundance.

Description

EMS memory management process and device
Technical field
This disclosure relates to computer realm more particularly to a kind of EMS memory management process and device.
Background technology
With the development of science and technology, the electronic apparatus applications range such as computer, mobile phone, tablet computer is more and more extensive, these Electronic equipment generally the problem of physical memory deficiency can all occur in use.For the problem, with Windows systems In the computer of system, which can divide a part of hard drive space and be used as virtual memory, insufficient to solve physical memory Problem.But for the electronic equipment of the memory headrooms very little such as mobile phone, tablet computer, the safety installed by these electronic equipments Digital card (English:Secure Digital Memory Card;Referred to as:SD card) etc. storage mediums erasable number it is limited, Virtual memory generally is cannot function as, therefore, there is an urgent need for a kind of EMS memory management process for these electronic equipments.
In the related technology, included memory headroom can be divided into two pieces of different regions by electronic equipment, and one piece of region is made For physical memory, another piece of region is as virtual memory.Later, which it is interior can to monitor having used for physical memory It deposits, or the running memory needed for the application program of the monitoring current accessed physical memory, when this has been used, interior there are the physics When shared ratio is more than specified use ratio or the running memory more than specified memory in total memory of memory, the electronics Equipment can select the lower data of frequency of use from the physical memory, and by the data conversion storage to virtual memory of selection, To realize the management of memory.Wherein, the specified use ratio and the specified memory are preset parameters set in advance.
Invention content
To overcome the problems in correlation technique, a kind of EMS memory management process of disclosure offer and device.
According to the first aspect of the embodiments of the present disclosure, a kind of EMS memory management process is provided, the method includes:
Monitor the physical memory and virtual memory of electronic equipment;
When the first free memory of the physical memory is more than the second free memory of first threshold and the virtual memory When less than or equal to second threshold, increase the memory management parameter of the physical memory, the memory management parameter includes specified Use ratio or specified memory;
Based on the memory management parameter after increase, the physical memory and the virtual memory are managed, to increase The use of the physical memory and the use for reducing the virtual memory.
With reference to first aspect, in the first possible realization method of above-mentioned first aspect, the monitoring electronic equipment Physical memory and virtual memory before, further include:
The memory headroom of the electronic equipment is divided into the physical memory and the virtual memory;
The second threshold of the first threshold and the virtual memory of the physical memory is set.
With reference to first aspect, in second of possible realization method of above-mentioned first aspect, the method further includes:
It is more than described the when first free memory is less than or equal to the first threshold and second free memory When two threshold values, reduce the memory management parameter, to reduce the use of the physics and increase the use of the virtual memory.
With reference to first aspect, in the third possible realization method of above-mentioned first aspect, the method further includes:
It is less than or equal to when first free memory is less than or equal to the first threshold and second free memory When the second threshold, display reminding information, the prompt message is for prompting memory headroom insufficient.
According to the second aspect of the embodiment of the present disclosure, a kind of memory management device is provided, described device includes:
Monitoring modular, physical memory and virtual memory for monitoring electronic equipment;
Increase module, is more than first threshold and the virtual memory for the first free memory when the physical memory When second free memory is less than or equal to second threshold, increase the memory management parameter of the physical memory, the memory management Parameter includes specified use ratio or specified memory;
Management module, for based on the memory management parameter after increase, to the physical memory and the virtual memory into Row management, to increase the use of the physical memory and reduce the use of the virtual memory.
In conjunction with second aspect, in the first possible realization method of above-mentioned second aspect, described device further includes:
Division module, for by the memory headroom of the electronic equipment be divided into the physical memory and it is described it is virtual in It deposits;
Setup module, the second threshold of first threshold and the virtual memory for the physical memory to be arranged.
In conjunction with second aspect, in second of possible realization method of above-mentioned second aspect, described device further includes:
Reduce module, for being less than or equal in the first threshold and second residue when first free memory When depositing more than the second threshold, reduce the memory management parameter, to reduce the use of the physics and increase described virtual The use of memory.
In conjunction with second aspect, in the third possible realization method of above-mentioned second aspect, described device further includes:
Display module, for being less than or equal in the first threshold and second residue when first free memory When depositing less than or equal to the second threshold, display reminding information, the prompt message is for prompting memory headroom insufficient.
According to the third aspect of the embodiment of the present disclosure, a kind of memory management device is provided, described device includes:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
Monitor the physical memory and virtual memory of electronic equipment;
When the first free memory of the physical memory is more than the second free memory of first threshold and the virtual memory When less than or equal to second threshold, increase the memory management parameter of the physical memory, the memory management parameter includes specified Use ratio or specified memory;
Based on the memory management parameter after increase, the physical memory and the virtual memory are managed, to increase The use of the physical memory and the use for reducing the virtual memory.
The technical scheme provided by this disclosed embodiment can include the following benefits:The embodiment of the present disclosure passes through the electricity The first threshold and second threshold of sub- equipment, and the physical memory and virtual memory of the electronic equipment are monitored, monitoring the electricity When the Insufficient virtual memory of sub- equipment and the physical memory abundance, increase the memory management parameter, to increase the physical memory Using and reduce the use of the virtual memory, reduce the excessive use to virtual memory, improve that memory headroom is whole to be made Use efficiency.
It should be understood that above general description and following detailed description is only exemplary and explanatory, not The disclosure can be limited.
Description of the drawings
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the present invention Example, and be used to explain the principle of the present invention together with specification.
Fig. 1 is a kind of flow chart of EMS memory management process shown according to an exemplary embodiment.
Fig. 2 is the flow chart of another EMS memory management process shown according to an exemplary embodiment.
Fig. 3 is a kind of structure diagram of memory management device shown according to an exemplary embodiment.
Fig. 4 is a kind of block diagram of memory management device shown according to an exemplary embodiment.
Fig. 5 is the block diagram of another memory management device shown according to an exemplary embodiment.
Fig. 6 is the block diagram according to another memory management device shown in an exemplary embodiment.
Specific implementation mode
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent and the consistent all embodiments of the present invention.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects being described in detail in claims, of the invention.
Fig. 1 is a kind of flow chart of EMS memory management process shown according to an exemplary embodiment, and this method is used for electronics In equipment, as shown in Figure 1, this approach includes the following steps.
In a step 101, the physical memory and virtual memory of electronic equipment are monitored.
In a step 102, when the first free memory of the physical memory is more than first threshold and the second of the virtual memory When free memory is less than or equal to second threshold, increase the memory management parameter of the physical memory, which includes Specified use ratio or specified memory.
In step 103, based on the memory management parameter after increase, pipe is carried out to the physical memory and the virtual memory Reason, to increase the use of the physical memory and reduce the use of the virtual memory.
The embodiment of the present disclosure monitors the physics of the electronic equipment by the first threshold and second threshold of the electronic equipment Memory and virtual memory increase the memory in the Insufficient virtual memory for monitoring the electronic equipment and the physical memory abundance Management parameters are reduced with increasing the use of the physical memory and reducing the use of the virtual memory to the excessive of virtual memory It uses, improves the service efficiency of memory headroom entirety.
In another embodiment of the present disclosure, before the physical memory and virtual memory that monitor electronic equipment, further include:
The memory headroom of the electronic equipment is divided into the physical memory and the virtual memory;
The first threshold of the physical memory and the second threshold of the virtual memory are set.
In another embodiment of the present disclosure, this method further includes:
When first free memory is less than or equal to the first threshold and second free memory is more than the second threshold, Reduce the memory management parameter, to reduce the use of the physics and increase the use of the virtual memory.
In another embodiment of the present disclosure, this method further includes:
When first free memory be less than or equal to the first threshold and second free memory be less than or equal to this second When threshold value, display reminding information, the prompt message is for prompting memory headroom insufficient.
Above-mentioned all optional technical solutions, can form the alternative embodiment of the disclosure according to any combination, and the disclosure is real Example is applied no longer to repeat this one by one.
Fig. 2 is the flow chart of another EMS memory management process shown according to an exemplary embodiment, and this method is for electricity In sub- equipment, as shown in Fig. 2, this approach includes the following steps.
In step 201, the memory headroom of the electronic equipment is divided into physical memory and virtual memory.
The memory headroom of the electronic equipments such as mobile phone is smaller, often will appear the lower data of frequency of use and occupies memory sky Between and the phenomenon that lead to low memory, and for releasing memory space, ensure the reasonable utilization of memory headroom, improve to memory sky Between whole service efficiency, the memory headroom of the electronic equipment can be divided physical memory and virtual memory, and will be in physics It is transferred in virtual memory after depositing the lower data compression of frequency of use, to which a part can be released by data compression Memory headroom.
Wherein, when the memory headroom of the electronic equipment being divided into physical memory and virtual memory, general virtual memory can To be more than physical memory, it is of course also possible to be less than or equal to physical memory, in practical application, can be drawn according to actual demand Physical memory and virtual memory, the embodiment of the present disclosure is divided to be not specifically limited this.
It should be noted that the method that virtual memory will be transferred to after the lower data compression of frequency of use in physical memory The relevant technologies can be referred to, the embodiment of the present disclosure repeats no more this.
For example, the memory headroom of the electronic equipment be 600M, by the memory headroom be divided into 250M physical memory and The virtual memory of 350M can store the unpressed data of 250M in the physical memory, and can be deposited in the virtual memory Store up the compressed data of 350M.
In step 202, the first threshold of the physical memory and the second threshold of the virtual memory are set.
When the physical memory or virtual memory of electronic equipment are used up and then are carried out to the memory headroom of the electronic equipment Management, may cause the operation of application program to malfunction, therefore, which sets because of physical memory or Insufficient virtual memory After standby division physical memory and virtual memory, the second threshold of first threshold and the virtual memory that the physical memory is set is needed Value, can know that physical memory i.e. will be insufficient, and can also know void in advance by second threshold in advance by first threshold Quasi- memory i.e. will be insufficient.It that is to say, when remaining physical memory is less than or equal to the first threshold, that is, illustrate the electronic equipment Physical memory it is insufficient, when remaining virtual memory is less than or equal to the second threshold, that is, illustrate the virtual of the electronic equipment Low memory.
Wherein, the first threshold and second threshold can be arranged when dividing physical memory and virtual memory, can also It is to be arranged after dividing physical memory and virtual memory, as long as first threshold and second threshold are set before memory management It sets, the embodiment of the present disclosure is not specifically limited the setting opportunity of first threshold and second threshold.
It should be noted that the first threshold and second threshold can be the electronic equipments when not installing any application program Minimal physical memory needed for normal operation and virtual memory.
When the memory headroom of the electronic equipment is divided into physical memory and virtual memory, and provided with first threshold and the After two threshold values, the behaviour in service for monitoring the electronic equipment is needed, to determine that the electronic equipment is that physical memory is insufficient or empty Quasi- low memory, to be managed to memory headroom, as described below.
In step 203, the physical memory and virtual memory of electronic equipment are monitored.
Since the service condition moment of physical memory in electronic equipment and virtual memory is all changing, in order to In physical memory deficiency or Insufficient virtual memory, which is adjusted in time, needs to monitor in real time and be somebody's turn to do The physical memory and virtual memory of electronic equipment, to determine in real time physical memory the first free memory and virtual memory the Two free memories.
Wherein, when monitoring the physical memory and virtual memory of the electronic equipment, the of physical memory can not only be monitored Second free memory of one free memory and virtual memory, it is more than the specified memory that can also monitor and occupy the space of physical memory Application program, or the monitoring lower application program of running frequency, the embodiment of the present disclosure is not specifically limited this.
It should be noted that specified memory can be arranged in advance, for example, specified memory is 100M, the embodiment of the present disclosure pair This is not specifically limited.
In step 204, when the first free memory of the physical memory is more than first threshold and the second of the virtual memory When free memory is less than or equal to second threshold, increase the memory management parameter, based on the memory management parameter after increase, to this Physical memory and virtual memory are managed, to increase the use of physical memory and reduce the use of virtual memory, the memory pipe It includes specified use ratio or specified memory to manage parameter.
When the second free memory that the first free memory of the physical memory is more than first threshold and the virtual memory is less than Or when equal to second threshold, that is, illustrate the Insufficient virtual memory of the electronic equipment, and physical memory is sufficient, can increase this at this time Memory management parameter, and based on the memory management parameter after increase, the physical memory and virtual memory are managed, to increase The use of physical memory and the use for reducing virtual memory.
Wherein, increasing the operation of the memory management parameter can be:When the memory management parameter includes specified use ratio When, the specified use ratio can be increased;And when the memory management parameter includes specified memory, it is specified interior that this can be increased It deposits.
It should be noted that the specified use ratio be used to characterize the physical memory used memory size in the physics Shared ratio in total memory size of memory, the specified memory are used to characterize needed for the application program for accessing the physical memory Memory size, and the specified use ratio and the specified memory can be pre-set by user according to personal habits, the disclosure is real Example is applied to be not especially limited this.
It should also be noted that, when increasing the memory management parameter, which can be often to monitor the physical memory The first free memory when being more than the second free memory of first threshold and the virtual memory and being less than or equal to second threshold, by this Memory management parameter increases fixed numbers, which can be preset by user, can also be advance by the electronic equipment Setting;Certainly, which can be often to monitor that the first free memory of the physical memory is more than first threshold and the void When second free memory of quasi- memory is less than or equal to second threshold, it is set by the user the memory management parameter, it is interior to increase this Deposit management parameters.
Wherein, the memory management parameter increased fixed numbers every time are preset by user or the electronic equipment, it can So that the electronic equipment is more steady when adjusting physical memory and virtual memory;And often monitor that the first of the physical memory remains When remaining memory is more than the second free memory of first threshold and the virtual memory less than or equal to second threshold, it is set by the user this Memory management parameter can make the electronic equipment rapider when adjusting physical memory and virtual memory, but when user sets The memory management parameter of mistake, for example, this is specified use ratio to be set as the numerical value other than 0-100% or user by user The specified memory is set as the value more than the electronic equipment physical memory, at this moment possibly can not play and increase making for physical memory With and reduce the effect used to virtual memory or even the electronic equipment and may run error, therefore, can be in practical application It is configured for different demands.
It should be noted that the electronic equipment is based on the memory management parameter after increase, it is to the physical memory and virtually interior The relevant technologies can be referred to by depositing the method being managed, this is no longer described in detail in the embodiment of the present disclosure.
In the embodiments of the present disclosure, memory management device can be electronic equipment, which may include Java layers Strategic control module, core layer (English:Kernel) memory configurations and monitoring modular and Java local interfaces middle layer (English: Java Native Interface;Referred to as:Jni) module.Java layers of strategic control module can be connect by Jni middle layer modules Receive the Kernel layers of physical memory reported deficiency or the event of Insufficient virtual memory, the type by event and other policy informations It determines to increase or reduce memory management parameter, application layer configuration management module is then informed by Jni middle layer modules. Kernel layers of memory configurations and monitoring modular receive Java layer strategic control module can be issued in initialization first threshold with Second threshold, when monitoring that the first free memory is less than or equal to first threshold and the second free memory is more than second threshold, The insufficient event of physical memory is reported to Java layers of strategic control module;When the second free memory of discovery is less than or equal to second When threshold value and the first free memory are more than first threshold, i.e., the thing of Insufficient virtual memory is reported to Java layers of strategic control module Part.Jni middle layer modules are the programs based on C language and the interface that mutually calls and communicate between the program based on Java language Layer, Jni middle layer modules realize Java layers of strategic control module and match with Kenerl layers of memory configurations and monitoring modular, application layer Set the interface of management module communication.Application layer configuration management module increases memory according to the instruction of java layers of strategic control module Management parameters reduce memory management parameter.For example, as shown in figure 3, working as Kernel layers of memory configurations and monitoring module monitors When being more than first threshold and the second free memory to the first free memory and being less than or equal to second threshold, pass through Jni middle layer moulds Block reports physical memory abundance to Java layers of strategic control module and Insufficient virtual memory, Java layers of strategic control module pass through Jni middle layer modules inform that application layer configuration management module increases memory management parameter, when the memory management parameter includes specified When use ratio, application layer configuration management module increases the specified use ratio;When the memory management parameter includes specified memory When, increase the specified memory, to increase the use of physical memory and reduce the use of virtual memory.
For example, the electronic equipment memory headroom is physical memory 250M, virtual memory 350M, setting first threshold is 50M, Second threshold is 70M, and current specified use ratio is 80%, specified memory 200M.When monitoring that the first free memory is When 210M, the second free memory are 40M, i.e. the first free memory is more than first threshold and the second free memory is less than the second threshold Value illustrates that electronic equipment physical memory is sufficient and Insufficient virtual memory, therefore specifies use ratio to be increased to by 80% this 85%, or the specified memory is increased into 230M by 200M, it can so reduce use of the electronic equipment to virtual memory And use of the increase to physical memory.
In step 205, when the first free memory of the physical memory is less than or equal to first threshold and the virtual memory The second free memory when being more than second threshold, reduce the memory management parameter, to reduce the use of physics and increase in virtual The use deposited.
When first free memory is less than or equal to the first threshold and second free memory is more than the second threshold, Illustrate that the physical memory of the electronic equipment is insufficient, and virtual memory is sufficient, at this point, the electronic equipment can reduce the memory pipe Parameter is managed, with the use increased to virtual memory and the use reduced to physical memory.
Wherein, reducing the operation of the memory management parameter can be:When the memory management parameter includes specified use ratio When, the specified use ratio can be reduced;And when the memory management parameter includes specified memory, it is specified interior that this can be reduced It deposits.
It should be noted that when reducing the memory management parameter, which can be often to monitor the physical memory It is when first free memory is less than or equal to the second free memory of first threshold and the virtual memory more than second threshold, this is interior It deposits management parameters and reduces fixed numbers, which can be preset by user, can also in advance be set by the electronic equipment It is fixed;Certainly, the electronic equipment can with often monitor the physical memory the first free memory be less than or equal to first threshold and When second free memory of the virtual memory is more than second threshold, it is set by the user the memory management parameter, to reduce the memory Management parameters.
For example, when monitoring that first free memory of electronic equipment is 30M, when the second free memory is 190M, i.e., first Free memory is less than first threshold and the second free memory and is more than second threshold, illustrate the virtual memory of the electronic equipment it is sufficient and Physical memory is insufficient, therefore the designated ratio is reduced to 75% by 80%, or the specified memory is reduced to 170M, so Use of the electronic equipment to the use of virtual memory and reduction to physical memory can be increased.
In step 206, when first free memory is less than or equal to the first threshold and second free memory is less than Or when equal to the second threshold, display reminding information, the prompt message is for prompting memory headroom insufficient.
When first free memory be less than or equal to the first threshold and second free memory be less than or equal to this second When threshold value, that is, illustrate that the physical memory of the electronic equipment and virtual memory are all insufficient, at this point, the electronic equipment can be with display reminding Information, to prompt the memory headroom of user's electronic equipment insufficient.
Wherein, when showing the prompt message, which can also show that it is more than in this is specified to occupy physical memory The lower application program identification of application program identification or running frequency deposited so that user has found that certain malice occupy in time The virus applications of memory or the very low application of certain frequency of use improve the service efficiency of memory to delete the application.
It should be noted that show the mode of the prompt message can be shown by pop-up, window is shown or other Mode shows that it is not limited in this embodiment of the present disclosure.
In addition, application program identification is for the unique mark application program, and the application program identification can be the application The title of program, icon etc., the embodiment of the present disclosure is not specifically limited this.
For example, when monitoring that first free memory of electronic equipment is 30M, when the second free memory is 40M, i.e., first is surplus Remaining memory is less than first threshold and the second free memory is less than second threshold, illustrates the electronic equipment virtual memory and physical memory Insufficient, display reminding information prompts user memory insufficient.
The embodiment of the present disclosure monitors the physics of the electronic equipment by the first threshold and second threshold of the electronic equipment Memory and virtual memory increase the memory in the Insufficient virtual memory for monitoring the electronic equipment and the physical memory abundance Management parameters improve the use effect of physical memory to increase the use of the physical memory and reduce the use of the virtual memory Rate avoids the waste of physical memory resource;When monitoring the insufficient electronic equipment physical memory and the virtual memory abundance, Reduce the memory management parameter, to reduce to the use of the physical memory and increase use to the virtual memory, avoid because The problem of can not running new application program for physical memory deficiency, preferably alleviate electronic equipment low memory, internally It deposits space and has carried out reasonable utilization, improve the service efficiency of memory headroom entirety.
Fig. 4 is a kind of block diagram of memory management device shown according to an exemplary embodiment.As shown in figure 4, the device Including monitoring modular 401, increase module 402 and management module 303.
Monitoring modular 401, physical memory and virtual memory for monitoring electronic equipment;
Increase module 402, is more than first threshold and the virtual memory for the first free memory when the physical memory When second free memory is less than or equal to second threshold, increase the memory management parameter of the physical memory, the memory management parameter Including specified use ratio or specified memory;
Management module 403, for based on the memory management parameter after increase, being carried out to the physical memory and the virtual memory Management, to increase the use of the physical memory and reduce the use of the virtual memory.
In another embodiment of the present disclosure, as shown in figure 5, the device further includes division module 404 and setup module 405。
Division module 404, for the memory headroom of the electronic equipment to be divided into the physical memory and the virtual memory;
Setup module 405, for the first threshold of the physical memory and the second threshold of the virtual memory to be arranged.
In another embodiment of the present disclosure, which further includes second adjustment module 306.
Second adjustment module 406, for being less than or equal to the first threshold and second residue when first free memory When memory is more than the second threshold, reduce the memory management parameter, to reduce the use of the physics and increase the virtual memory It uses.
In another embodiment of the present disclosure, which further includes display module 407.
Display module 407, for being less than or equal to the first threshold and second free memory when first free memory When less than or equal to the second threshold, display reminding information, the prompt message is for prompting memory headroom insufficient.
The embodiment of the present disclosure monitors the physics of the electronic equipment by the first threshold and second threshold of the electronic equipment Memory and virtual memory increase the memory in the Insufficient virtual memory for monitoring the electronic equipment and the physical memory abundance Management parameters improve the use effect of physical memory to increase the use of the physical memory and reduce the use of the virtual memory Rate avoids the waste of physical memory resource.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, explanation will be not set forth in detail herein.
Fig. 6 is a kind of block diagram for memory management device 600 shown according to an exemplary embodiment.For example, device 600 can be mobile phone, computer, digital broadcast terminal, messaging devices, game console, tablet device, and medical treatment is set It is standby, body-building equipment, personal digital assistant etc..
With reference to Fig. 6, device 600 may include following one or more components:Processing component 602, memory 604, power supply Component 606, multimedia component 608, audio component 610, the interface 612 of input/output (I/O), sensor module 614, and Communication component 616.
The integrated operation of 602 usual control device 600 of processing component, such as with display, call, data communication, phase Machine operates and record operates associated operation.Processing element 602 may include that one or more processors 620 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 602 may include one or more modules, just Interaction between processing component 602 and other assemblies.For example, processing component 602 may include multi-media module, it is more to facilitate Interaction between media component 608 and processing component 602.
Memory 604 is configured as storing various types of data to support the operation in equipment 600.These data are shown Example includes instruction for any application program or method that are operated on device 600, contact data, and telephone book data disappears Breath, picture, video etc..Memory 604 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static RAM (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
Electric power assembly 606 provides electric power for the various assemblies of device 600.Electric power assembly 606 may include power management system System, one or more power supplys and other generated with for device 600, management and the associated component of distribution electric power.
Multimedia component 608 is included in the screen of one output interface of offer between described device 600 and user.One In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers Body component 608 includes a front camera and/or rear camera.When equipment 600 is in operation mode, such as screening-mode or When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 610 is configured as output and/or input audio signal.For example, audio component 610 includes a Mike Wind (MIC), when device 600 is in operation mode, when such as call model, logging mode and speech recognition mode, microphone by with It is set to reception external audio signal.The received audio signal can be further stored in memory 604 or via communication set Part 616 is sent.In some embodiments, audio component 610 further includes a loud speaker, is used for exports audio signal.
I/O interfaces 612 provide interface between processing component 602 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and lock Determine button.
Sensor module 614 includes one or more sensors, and the state for providing various aspects for device 600 is commented Estimate.For example, sensor module 614 can detect the state that opens/closes of equipment 600, and the relative positioning of component, for example, it is described Component is the display and keypad of device 600, and sensor module 614 can be with 600 1 components of detection device 600 or device Position change, the existence or non-existence that user contacts with device 600,600 orientation of device or acceleration/deceleration and device 600 Temperature change.Sensor module 614 may include proximity sensor, be configured to detect without any physical contact Presence of nearby objects.Sensor module 614 can also include optical sensor, such as CMOS or ccd image sensor, at As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 616 is configured to facilitate the communication of wired or wireless way between device 600 and other equipment.Device 600 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or combination thereof.In an exemplary implementation In example, communication component 616 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, the communication component 616 further includes near-field communication (NFC) module, to promote short range communication.Example Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 600 can be believed by one or more application application-specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, it includes the non-transitorycomputer readable storage medium instructed, example to additionally provide a kind of Such as include the memory 604 of instruction, above-metioned instruction can be executed by the processor 620 of device 600 to complete the above method.For example, The non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk With optical data storage devices etc..
A kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by the processing of mobile terminal When device executes so that mobile terminal is able to carry out a kind of EMS memory management process, the method includes:
Monitor the physical memory and virtual memory of electronic equipment;
When the second free memory that the first free memory of the physical memory is more than first threshold and the virtual memory is less than Or when equal to second threshold, increase the memory management parameter of the physical memory, which includes specified use ratio Or specified memory;
Based on the memory management parameter after increase, the physical memory and the virtual memory are managed, to increase the object It manages the use of memory and reduces the use of the virtual memory.
In another embodiment of the present disclosure, before the physical memory and virtual memory that monitor electronic equipment, further include:
The memory headroom of the electronic equipment is divided into the physical memory and the virtual memory;
The first threshold of the physical memory and the second threshold of the virtual memory are set.
In another embodiment of the present disclosure, this method further includes:
When first free memory is less than or equal to the first threshold and second free memory is more than the second threshold, Reduce the memory management parameter, to reduce the use of the physics and increase the use of the virtual memory.
In another embodiment of the present disclosure, this method further includes:
When first free memory be less than or equal to the first threshold and second free memory be less than or equal to this second When threshold value, display reminding information, the prompt message is for prompting memory headroom insufficient.
The embodiment of the present disclosure monitors the electronic equipment by the way that the first threshold and second threshold of the electronic equipment is arranged Physical memory and virtual memory, in the Insufficient virtual memory for monitoring the electronic equipment and the physical memory abundance, increasing should Memory management parameter is reduced with increasing the use of the physical memory and reducing the use of the virtual memory to virtual memory It excessively uses, improves the service efficiency of memory headroom entirety.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the present invention Its embodiment.This application is intended to cover the present invention any variations, uses, or adaptations, these modifications, purposes or Person's adaptive change follows the general principle of the present invention and includes the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.

Claims (9)

1. a kind of EMS memory management process, which is characterized in that the method includes:
Monitor the physical memory and virtual memory of electronic equipment;
When the second free memory that the first free memory of the physical memory is more than first threshold and the virtual memory is less than Or when equal to second threshold, increase the memory management parameter of the physical memory, the memory management parameter includes specified uses Ratio or specified memory;
Based on the memory management parameter after increase, the physical memory and the virtual memory are managed, described in increase The use of physical memory and the use for reducing the virtual memory;
Wherein, the memory management parameter for increasing the physical memory, including:The memory management parameter is increased into fixed number Value, the fixed numbers are preset by user or the electronic equipment.
2. the method as described in claim 1, which is characterized in that it is described monitoring electronic equipment physical memory and virtual memory it Before, further include:
The memory headroom of the electronic equipment is divided into the physical memory and the virtual memory;
The second threshold of the first threshold and the virtual memory of the physical memory is set.
3. method as claimed in claim 1 or 2, which is characterized in that the method further includes:
When first free memory is less than or equal to the first threshold and second free memory is more than second threshold When value, reduce the memory management parameter, to reduce the use of the physical memory and increase the use of the virtual memory.
4. method as claimed in claim 1 or 2, which is characterized in that the method further includes:
When first free memory is less than or equal to the first threshold and second free memory is less than or equal to described When second threshold, display reminding information, the prompt message is for prompting memory headroom insufficient.
5. a kind of memory management device, which is characterized in that described device includes:
Monitoring modular, physical memory and virtual memory for monitoring electronic equipment;
Increase module, is more than the second of first threshold and the virtual memory for the first free memory when the physical memory When free memory is less than or equal to second threshold, increase the memory management parameter of the physical memory, the memory management parameter Including specified use ratio or specified memory;
Management module, for based on the memory management parameter after increase, pipe to be carried out to the physical memory and the virtual memory Reason, to increase the use of the physical memory and reduce the use of the virtual memory;
Wherein, the memory management parameter for increasing the physical memory, including:The memory management parameter is increased into fixed number Value, the fixed numbers are preset by user or the electronic equipment.
6. device as claimed in claim 5, which is characterized in that described device further includes:
Division module, for the memory headroom of the electronic equipment to be divided into the physical memory and the virtual memory;
Setup module, the second threshold of first threshold and the virtual memory for the physical memory to be arranged.
7. such as device described in claim 5 or 6, which is characterized in that described device further includes:
Reduce module, first free memory is less than or equal to the first threshold and second free memory is big for working as When the second threshold, reduce the memory management parameter, to reduce the use of the physical memory and increase described virtual The use of memory.
8. such as device described in claim 5 or 6, which is characterized in that described device further includes:
Display module, for working as, first free memory is less than or equal to the first threshold and second free memory is small When the second threshold, display reminding information, the prompt message is for prompting memory headroom insufficient.
9. a kind of memory management device, which is characterized in that described device includes:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
Monitor the physical memory and virtual memory of electronic equipment;
When the second free memory that the first free memory of the physical memory is more than first threshold and the virtual memory is less than Or when equal to second threshold, increase the memory management parameter of the physical memory, the memory management parameter includes specified uses Ratio or specified memory;
Based on the memory management parameter after increase, the physical memory and the virtual memory are managed, described in increase The use of physical memory and the use for reducing the virtual memory;
Wherein, the memory management parameter for increasing the physical memory, including:The memory management parameter is increased into fixed number Value, the fixed numbers are preset by user or the electronic equipment.
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 CN105512050A (en) 2016-04-20
CN105512050B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3475829A4 (en) * 2016-06-27 2020-02-26 Intel Corporation Dynamic configuration of compressed virtual memory
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

Citations (4)

* 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
CN103870544A (en) * 2014-02-25 2014-06-18 小米科技有限责任公司 Method and device for virtually operating file, and electronic equipment
CN103874987A (en) * 2012-10-15 2014-06-18 华为终端有限公司 Embedded multimedia card partition memory space adjustment method and terminal
CN104881241A (en) * 2014-02-28 2015-09-02 华为技术有限公司 Swap operation implementation method and apparatus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9753846B2 (en) * 2012-09-06 2017-09-05 Red Hat, Inc. Adjusting the operating memory used by a virtual machine during runtime

Patent Citations (4)

* 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
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

Also Published As

Publication number Publication date
CN105512050A (en) 2016-04-20

Similar Documents

Publication Publication Date Title
CN104219388B (en) Sound control method and device
CN105975301B (en) Memory method for cleaning and device, electronic equipment
CN105512545B (en) Access rights management method and device
CN104578372B (en) The method and device of control terminal equipment charge
CN106201686A (en) Management method, device and the terminal of application
CN106095401A (en) Informing message treatment method and device
CN104898505A (en) Smart scene configuration method and device
CN104991855B (en) Interface interim card processing method and processing device
CN105512050B (en) EMS memory management process and device
CN105955808B (en) The task management method and device of instant messaging application
CN103812996A (en) Information prompting method and apparatus, and terminal
CN104714826B (en) Using the loading method and device of theme
CN113867927A (en) Resource allocation method, device, electronic equipment and storage medium
CN104375760B (en) Method for information display and device
CN105975305B (en) OS Events processing method, device and terminal
CN105636238B (en) Wireless Fidelity WiFi connection control method and device
CN108538258A (en) Adjust method and device, the display equipment of back facet current
CN106254669A (en) Data traffic based reminding method and device
CN105868624A (en) Application program authority management method and device
CN106126488A (en) Information storage means and device
CN110856196B (en) WLAN service optimization method, terminal device and storage medium
CN104156387B (en) Display methods and device
CN106451670A (en) Charge control method, device and terminal equipment
CN105162783B (en) Operating right control method and device
CN107220008A (en) Memory space method for obligating 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