[go: up one dir, main page]

CN105893149A - Memory optimization method and device - Google Patents

Memory optimization method and device Download PDF

Info

Publication number
CN105893149A
CN105893149A CN201610195785.1A CN201610195785A CN105893149A CN 105893149 A CN105893149 A CN 105893149A CN 201610195785 A CN201610195785 A CN 201610195785A CN 105893149 A CN105893149 A CN 105893149A
Authority
CN
China
Prior art keywords
resource file
service processes
copy
memory
detected
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.)
Pending
Application number
CN201610195785.1A
Other languages
Chinese (zh)
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.)
LeTV Holding Beijing Co Ltd
LeTV Information Technology Beijing Co Ltd
Original Assignee
LeTV Holding Beijing Co Ltd
LeTV Information Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by LeTV Holding Beijing Co Ltd, LeTV Information Technology Beijing Co Ltd filed Critical LeTV Holding Beijing Co Ltd
Priority to CN201610195785.1A priority Critical patent/CN105893149A/en
Publication of CN105893149A publication Critical patent/CN105893149A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a memory optimization method and device. The method comprises the steps of detecting the state of a service process used for calling and implementing a resource file during operation, wherein the resource file is provided with two or more copies which are different in size; if it is detected that the service process suspends, terminating the service process; if it is detected that the service process calls the resource file, obtaining the current memory occupation state of a system, and calling the resource file copy of the appropriate size according to the memory occupation state; if it is detected that the copies of the resource file of the service process are implemented completely, releasing the copies of the resource file. According to the memory optimization method and device, by terminating the suspended process in time, selecting the resource file copy of the appropriate size, releasing the resource file copies in time and the like, on the premise that user experience is guaranteed, the memory occupation amount of a foreground program is reduced as much as possible, thus frequency of the system to implement memory clearing is reduced, and smoothness of software operation is improved.

Description

A kind of Memory Optimize Method and device
Technical field
The present invention relates to mobile device memory management technology field, particularly relate to a kind of Memory Optimize Method and dress Put.
Background technology
The upper software run of current main-stream intelligent terminal, mainly service processes and service processes by backstage call Resource file composition: partial service process complete software inhouse calculating and process work, another part take Business process maintains the interactive interface of software by calling resource file.Along with the continuous expansion of software function, soft The Installed System Memory capacity that part operationally takies also gets more and more, and causes part intelligent terminal operationally to occur The problems such as card;Intelligent terminal occurs the main cause of card to be that Installed System Memory is not enough, in system detects When surplus amount is not enough to the function having supported software, the resource file that backstage is discarded can be cleared up, with Expanding free memory, system can be caused burden by the process itself clearing up the resource file that backstage is discarded, The problem causing card.
Existing software uses complete resource file not have for the service processes stopped and part Effective processing method, cause system when the resource file that backstage is discarded is cleared up, by this part Hold and be judged to still using, thus be retained in internal memory, the resource that each internal memory scale removal process is deleted File is little, and interval very short time is accomplished by again clearing up, thus causes the frequently card of intelligent terminal.
Summary of the invention
In view of this, it is an object of the invention to propose a kind of Memory Optimize Method and device, right in order to realize Effective cleaning of Installed System Memory, improves, by reducing clearing times, the smooth degree that intelligent terminal runs.
Method based on a kind of internal memory optimization that the above-mentioned purpose present invention provides, including:
During foreground program runs, detection is used for transferring and performing the service of resource file and enters in running The state of journey, wherein, described resource file is furnished with at least two copy varied in size;
If having detected, service processes suspends, and is terminated by this service processes;
If service processes calling resource file having been detected, obtain the EMS memory occupation state that system is current, according to Described EMS memory occupation state transfers the copy that this resource file is appropriately sized;
If detecting, the resource file copy of described service processes is finished, and discharges this resource file copy.
Optionally, detect that service processes suspends if described, this service processes has been terminated, including:
Detect whether described service processes is currently in use resource file;If described service processes does not use resource File, it is determined that described service processes suspends;
If described service processes is currently in use resource file, after whether continuation this resource file of detection is in system Platform;If this resource file is in system background, it is determined that described service processes suspends.
Optionally, service processes calling resource file having been detected if described, the current internal memory of acquisition system accounts for By state, transfer, according to described EMS memory occupation state, the copy that this resource file is appropriately sized, including:
Obtain the free memory value of system spare;
By the copy of described resource file according to data volume from big to small order sequence;
Judge whether the copy of described resource file is less than the free memory value of described system spare successively;If so, Transfer first described copy less than the free memory value of described system spare.
Optionally, described resource file preset state mark;If the described resource described service processes being detected Duplicate of the document is finished, and discharges this resource file copy, including:
Obtain the use state of described resource file copy, secondary according to this resource file of described use condition adjudgement Whether this is finished;If it is determined that this resource file copy is finished, it is set to discard by its status indicator;
After usable levels Installed System Memory being detected is less than the cleaning threshold preset, it is discarded by status indicator Described resource file copy removes from Installed System Memory.
Optionally, described service processes includes the EMS memory occupation desired value preset;Described in system being detected After the usable levels deposited is less than the cleaning threshold preset, by status indicator be discarded described resource file copy from In removing in Installed System Memory, the computational methods of described cleaning threshold include:
Calculate the sum of the described service processes EMS memory occupation desired value being currently running in Installed System Memory;
The total amount using Installed System Memory deducts the sum of described service processes EMS memory occupation desired value, then deducts default Adjusted value, obtain described cleaning threshold;
If detect described service processes EMS memory occupation desired value and change, according to after changing EMS memory occupation desired value and recalculate described cleaning threshold.
The present invention also provides for the device of a kind of internal memory optimization, device be resource file arrange vary in size to Few two copies, device includes:
Service processes unit, during running at foreground program, detection is used for transferring and holding in running The state of the service processes of row resource file, wherein, described resource file is furnished with at least two varied in size Copy;
End of service unit, for when having detected that service processes suspends, terminates this service processes;
Copy selects unit, for when service processes calling resource file having been detected, obtains system current EMS memory occupation state, transfer, according to described EMS memory occupation state, the copy that this resource file is appropriately sized;
Copy releasing unit, is used for when the resource file copy described service processes being detected is finished, Discharge this resource file copy.
Optionally, described end of service unit is used for detecting whether described service processes is currently in use resource file; If described service processes does not use resource file, it is determined that described service processes suspends;If described service processes It is currently in use resource file, continues to detect whether this resource file is in system background;If at this resource file In system background, it is determined that described service processes suspends.
Optionally, described copy selects unit for obtaining the free memory value of system spare;By described resource The copy of file according to data volume from big to small order sequence;The copy judging described resource file successively is The no free memory value less than described system spare;The most described copy selects unit to be additionally operable to transfer the One described copy less than the free memory value of described system spare.
Optionally, unit is cleared up including internal memory;Described copy releasing unit is for obtaining described resource file Whether use state, be finished according to described this resource file of use condition adjudgement;If it is determined that this resource literary composition Part is finished, and is set to discard by its status indicator;Described internal memory cleaning unit is for system being detected After the usable levels of internal memory is less than the cleaning threshold preset, it is that discarded described resource file is from being by status indicator System internal memory removes.
Optionally, described service processes includes the EMS memory occupation desired value preset;Described deposit cleaning unit for Calculate the sum of the described service processes EMS memory occupation desired value being currently running in Installed System Memory;Use Installed System Memory Total amount deduct the sum of described service processes EMS memory occupation desired value, then deduct default adjusted value, obtain institute State cleaning threshold;Described internal memory cleaning unit is additionally operable to described service processes EMS memory occupation desired value be detected With when changing, according to change after described EMS memory occupation desired value and recalculate described cleaning threshold.
From the above it can be seen that a kind of Memory Optimize Method of present invention offer and device, by time Terminate time-out process, choose appropriately sized resource file copy and discharge the modes such as resource file copy in time, On the premise of ensureing Consumer's Experience, reduce the EMS memory occupation amount of foreground program as far as possible, thus reduce system and hold The frequency of row internal memory cleaning, improves the fluency of running software, and the program that improves is at mobile terminal, particularly The wide usage of low configuration mobile terminal.
Accompanying drawing explanation
The schematic flow sheet of the embodiment of the method for a kind of internal memory optimization that Fig. 1 provides for the present invention;
The schematic flow sheet of the alternative embodiment of the method for a kind of internal memory optimization that Fig. 2 provides for the present invention;
The schematic flow sheet of the alternative embodiment of the method for a kind of internal memory optimization that Fig. 3 provides for the present invention;
The schematic flow sheet of the alternative embodiment of the method for a kind of internal memory optimization that Fig. 4 provides for the present invention;
The schematic flow sheet of the alternative embodiment of the method for a kind of internal memory optimization that Fig. 5 provides for the present invention;
The block diagram of the embodiment of the device of a kind of internal memory optimization that Fig. 6 provides for the present invention.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with specific embodiment, And referring to the drawings, the present invention is described in more detail.
The schematic flow sheet of the embodiment of the method for a kind of internal memory optimization that Fig. 1 provides for the present invention.As schemed Show, in the embodiment of the method for a kind of internal memory optimization of present invention offer, including:
S10, arranges at least two copy varied in size for resource file;In the process that foreground program runs In, for transferring and perform the state of the service processes of resource file in detection operation:
S11, has detected whether that service processes suspends;If there being service processes to suspend, perform step S12.
S12, terminates this service processes.
In the prior art scheme, the service processes of time-out can be suspended without being terminated, so on the one hand Conveniently again call, on the other hand can reduce judgement step during programming, reduce program capacity. But, for mobile terminal, for particularly configuring relatively low mobile terminal, service processes is EMS memory occupation Major part, the service processes of hang-up can take substantial amounts of memory source, so that perform system every time Memory source amount available after cleaning is still little, will soon again trigger cleaning, cause program card to pause.
S13, has detected whether service processes calling resource file;If there being service processes calling resource file, Perform step S14.
S14, obtains the EMS memory occupation state that system is current, transfers this resource according to described EMS memory occupation state The copy that file is appropriately sized.
" copy " that occur in step S10 and S14 refers to: for the multiple different size of same curriculum offering File, such as, for the file of the picture multiple different resolution of offer that certain position occurs;For a certain Specially good effect animation provides different length, the dynamic image of different resolution, even static images etc..These are set The purpose of copy is to select the copy of suitable size according to the surplus of Installed System Memory when calling copy Use, on the premise of ensureing Consumer's Experience, prevent EMS memory occupation from too much causing triggering cleaning as far as possible.
S15, detects whether that the resource file copy of service processes is finished;If there being the money of service processes Source file copy is finished, and performs step S16.
S16, discharges this resource file copy.
Similar with service processes, in the prior art, resource file copy also will not be at once after being finished Cleaned, but hang up with service processes belonging to it, this result in some service processes actually used in Resource file amount is little, but the memory headroom that useless resource file takies is the biggest, and these are useless Resource file system perform cleaning time can be judged as cannot being cleared up by service processes, with Reason also can cause program frequently to clear up internal memory card.
Service processes running status is monitored by the present embodiment, by terminate in time time-out process, choose suitable When the resource file copy of size discharges the modes such as resource file copy with timely, before ensureing Consumer's Experience Put the EMS memory occupation amount reducing foreground program as far as possible, thus reduce system and perform the frequency of internal memory cleaning, Improve the fluency of running software.
The schematic flow sheet of the alternative embodiment of the method for a kind of internal memory optimization that Fig. 2 provides for the present invention.As Shown in figure, in an alternate embodiment of the invention, step S11, detect whether that service processes suspends, including:
S20, detects whether described service processes is currently in use resource file;If described service processes does not make With resource file, it is determined that described service processes suspends;If described service processes is currently in use resource file, hold Row step S21.
S21, detects whether this resource file is in system background;If this resource file is in system background, Judge that described service processes suspends.
In the present embodiment, the criterion that service processes suspends this state is extended.Except logical The upper service processes of Chang Yiyi does not use resource file then to judge outside its time-out, if this service processes is currently in use Resource file be in system background, also judge that this service processes suspends;So used when this service processes Resource file (such as some specially good effects or operation interface etc.) when being temporarily hidden in backstage, then by this money of support The service processes of source file is also judged to suspend;And the service processes suspended is terminated, discharges what it took Memory source, to reduce the internal memory usage amount of program.
The schematic flow sheet of the alternative embodiment of the method for a kind of internal memory optimization that Fig. 3 provides for the present invention.As Shown in figure, in an alternate embodiment of the invention, step S14, obtain the EMS memory occupation state that system is current, according to Described EMS memory occupation state transfers the copy that this resource file is appropriately sized, including:
S30, obtains the free memory value of system spare.
S31, by the copy of described resource file according to data volume from big to small order sequence.
S32, judges whether the copy of described resource file is less than the free memory value of described system spare successively; If so, first described copy less than the free memory value of described system spare is transferred.
Method in the present embodiment can accommodate by choosing current system remaining free memory value Big resource file copy, uses on the premise of not triggering Installed System Memory cleaning that data volume is big as far as possible, product The Resource Replica that matter is the highest, thus bring preferably Consumer's Experience.
The schematic flow sheet of the alternative embodiment of the method for a kind of internal memory optimization that Fig. 4 provides for the present invention.As Shown in figure, in an alternate embodiment of the invention, described resource file preset state identifies;Step S16, release should Resource file copy.Including:
S40, obtains the use state of described resource file copy, according to described this resource of use condition adjudgement Whether duplicate of the document is finished;If it is determined that this resource file copy is finished, its status indicator is arranged It is discarded.
S41, after usable levels Installed System Memory being detected is less than the cleaning threshold preset, by status indicator be Discarded described resource file copy removes from Installed System Memory.
Present embodiments provide a kind of method solving the resource file halfway problem of cleaning.Solve Releasing, resource file copy also will not be the most cleaned after being finished, but with service belonging to it into Journey is hung up, this result in some service processes actually used in resource file amount little, but useless money The memory headroom that source file takies is the biggest, and the meeting when system performs cleaning of these useless resource files It is judged as cannot being cleared up by service processes, program the most also can be caused frequently to clear up internal memory also Card.
Therefore, the present embodiment arranges status indicator to the copy of the useless resource file that these are finished is useless Abandon, these resource file copy with discarded mark be can be removed, without wait when performing cleaning Automatically it is judged to useless through this resource file copy of enough time.Do so can be effectively improved system every time The efficiency of system internal memory cleaning, thus reduce the frequency of internal memory cleaning.
The schematic flow sheet of the alternative embodiment of the method for a kind of internal memory optimization that Fig. 5 provides for the present invention.As Shown in figure, in an alternate embodiment of the invention, described service processes includes the EMS memory occupation desired value preset;Step S41, after usable levels Installed System Memory being detected is less than the cleaning threshold preset, is discarded by status indicator Described resource file remove from Installed System Memory, the computational methods of described cleaning threshold include:
S50, calculates the sum of the described service processes EMS memory occupation desired value being currently running in Installed System Memory.
EMS memory occupation desired value is the estimated value arranged for service processes, performed by different service processes The difference of task, estimates the memory source taken required for this service processes in advance thus obtains this service processes EMS memory occupation desired value.
S51, uses the total amount of Installed System Memory to deduct the sum of described service processes EMS memory occupation desired value, then subtracts Remove the adjusted value preset, obtain described cleaning threshold.
The adjusted value here preset at for balanced service process in actual moving process contingent, take Actual memory amount is more than the situation of its EMS memory occupation desired value.In some cases, if after above-mentioned calculating The cleaning threshold obtained is the value of no more than 0, then explanation service processes is more;In an alternate embodiment of the invention, If the value that cleaning threshold is no more than 0 obtained after calculating, described cleaning threshold is set in system The total amount deposited is multiplied by default cleaning coefficient.Here the preferable span clearing up coefficient be [0.7,1).
S52, if that described service processes EMS memory occupation desired value detected and change, after changing Described EMS memory occupation desired value and recalculate described cleaning threshold.
Step S52 updates cleaning threshold for the change calculations according to service processes running status.Deposit into when interior When journey is more, a less cleaning threshold can be calculated;When internal memory process is less, can be calculated One bigger cleaning threshold.The establishing method of this dynamic adjustment is relative to cleaning threshold is set to one Definite value, can obtain a less cleaning threshold, thus avoid because of cleaning threshold when internal memory process is more Excessive cause frequently internal memory cleaning;In like manner when internal memory process is less, a bigger cleaning can be obtained Threshold value, the most internally counter foil row cleaning, removes useless service processes or resource file in time, To ensure that new service processes has the Installed System Memory of abundance to use when being activated.
The block diagram of the embodiment of the device of a kind of internal memory optimization that Fig. 6 provides for the present invention.As it can be seen, In another embodiment of the present invention, also provide for the device of a kind of internal memory optimization, be resource literary composition in described device Part arranges at least two copy varied in size, and device includes:
Service processes unit 60, during running at foreground program, detection is used for transferring in running State with the service processes performing resource file.
End of service unit 61, for when having detected that service processes suspends, terminates this service processes.
Copy selects unit 62, for when service processes calling resource file having been detected, obtains system Current EMS memory occupation state, transfers, according to described EMS memory occupation state, the copy that this resource file is appropriately sized.
Copy releasing unit 63, for being finished at the resource file copy described service processes being detected Time, discharge this resource file copy.
Service processes running status is monitored by the device in the present embodiment, by terminate in time time-out process, Choose appropriately sized resource file copy and discharge the modes such as resource file copy in time, ensureing user's body Reduce the EMS memory occupation amount of foreground program on the premise of testing as far as possible, thus reduce system and perform internal memory cleaning Frequency, improves the fluency of running software.
In an alternate embodiment of the invention, described end of service unit 61 is used for the most just detecting described service processes Using resource file;If described service processes does not use resource file, it is determined that described service processes suspends; If described service processes is currently in use resource file, continue to detect whether this resource file is in system background; If this resource file is in system background, it is determined that described service processes suspends.
In an alternate embodiment of the invention, described copy selects unit 62 for obtaining the free memory of system spare Value;By the copy of described resource file according to data volume from big to small order sequence;Judge described money successively Whether the copy of source file is less than the free memory value of described system spare;If so, this copy is transferred.
In an alternate embodiment of the invention, described device includes that internal memory clears up unit 64;Described copy releasing unit 63 for obtaining the use state of described resource file, according to described this resource file of use condition adjudgement is No it is finished;If it is determined that this resource file is finished, it is set to discard by its status indicator;In described Deposit cleaning unit 64 for after detecting that the usable levels of Installed System Memory is less than the cleaning threshold preset, by shape State is designated discarded described resource file and removes from Installed System Memory.
In an alternate embodiment of the invention, described service processes includes the EMS memory occupation desired value preset;Described deposit clear Reason unit 64 is for calculating the sum of the described service processes EMS memory occupation desired value being currently running in Installed System Memory; The total amount using Installed System Memory deducts the sum of described service processes EMS memory occupation desired value, then deducts default tune Whole value, obtains described cleaning threshold;Described internal memory cleaning unit 64 is additionally operable to described service processes be detected EMS memory occupation desired value and when changing, according to the described EMS memory occupation desired value after changing and again Calculate described cleaning threshold.
From the above it can be seen that a kind of Memory Optimize Method of present invention offer and device, by time Terminate time-out process, choose appropriately sized resource file copy and discharge the modes such as resource file copy in time, On the premise of ensureing Consumer's Experience, reduce the EMS memory occupation amount of foreground program as far as possible, thus reduce system and hold The frequency of row internal memory cleaning, improves the fluency of running software, and the program that improves is at mobile terminal, particularly The wide usage of low configuration mobile terminal.
It should be noted that the statement of all uses " first " and " second " is all in the embodiment of the present invention The parameter of entity or non-equal in order to distinguish two same names non-equal, it is seen that " first " " second " Only for the convenience of statement, should not be construed as the restriction to the embodiment of the present invention, subsequent embodiment is to this no longer Illustrate one by one.
Those of ordinary skill in the field it is understood that the discussion of any of the above embodiment is exemplary only, It is not intended to imply that the scope of the present disclosure (including claim) is limited to these examples;Think of in the present invention Under road, can also be combined between the technical characteristic in above example or different embodiment, step can With with random order realize, and exist the present invention as above different aspect many other change, for Simple and clear they do not provide in the details.
It addition, for simplifying explanation and discussing, and in order to obscure the invention, provided Accompanying drawing can illustrate or can not illustrate and integrated circuit (IC) chip and the known power supply of other parts / grounding connection.Furthermore, it is possible to illustrate device in block diagram form, in order to avoid obscuring the invention, And this have also contemplated that following facts, i.e. the details about the embodiment of these block diagram arrangements is highly to depend on In will implement the present invention platform (that is, these details should be completely in the reason of those skilled in the art In the range of solution).Elaborating that detail (such as, circuit) is to describe the exemplary embodiment of the present invention In the case of, it will be apparent to those skilled in the art that can there is no these details In the case of or these details change in the case of implement the present invention.Therefore, these descriptions should be recognized For being illustrative and not restrictive.
Although invention has been described to have been incorporated with the specific embodiment of the present invention, but according to above Description, these embodiments a lot of replace, amendment and modification will be for those of ordinary skills Obviously.Such as, other memory architecture (such as, dynamic ram (DRAM)) can use The embodiment discussed.
Embodiments of the invention be intended to fall within the broad range of claims all so Replacement, amendment and modification.Therefore, all within the spirit and principles in the present invention, any omission of being done, Amendment, equivalent, improvement etc., should be included within the scope of the present invention.

Claims (10)

1. the method for an internal memory optimization, it is characterised in that including:
During foreground program runs, detection is used for transferring and performing the service of resource file and enters in running The state of journey, wherein, described resource file is furnished with at least two copy varied in size;
If having detected, service processes suspends, and is terminated by this service processes;
If service processes calling resource file having been detected, obtain the EMS memory occupation state that system is current, according to Described EMS memory occupation state transfers the copy that this resource file is appropriately sized;
If detecting, the resource file copy of described service processes is finished, and discharges this resource file copy.
Method the most according to claim 1, it is characterised in that service processes detected if described Suspend, this service processes is terminated, including:
Detect whether described service processes is currently in use resource file;If described service processes does not use resource File, it is determined that described service processes suspends;
If described service processes is currently in use resource file, after whether continuation this resource file of detection is in system Platform;If this resource file is in system background, it is determined that described service processes suspends.
Method the most according to claim 1, it is characterised in that service processes detected if described Calling resource file, obtains the EMS memory occupation state that system is current, transfers this according to described EMS memory occupation state The copy that resource file is appropriately sized, including:
Obtain the free memory value of system spare;
By the copy of described resource file according to data volume from big to small order sequence;
Judge whether the copy of described resource file is less than the free memory value of described system spare successively;If so, Transfer first described copy less than the free memory value of described system spare.
Method the most according to claim 1, it is characterised in that described resource file preset state mark Know;If the described resource file copy described service processes being detected is finished, discharge this resource file secondary This, including:
Obtain the use state of described resource file copy, secondary according to this resource file of described use condition adjudgement Whether this is finished;If it is determined that this resource file copy is finished, it is set to discard by its status indicator;
After usable levels Installed System Memory being detected is less than the cleaning threshold preset, it is discarded by status indicator Described resource file copy removes from Installed System Memory.
Method the most according to claim 4, it is characterised in that described service processes includes presetting EMS memory occupation desired value;Described after usable levels Installed System Memory being detected is less than the cleaning threshold preset, will During the described resource file copy that status indicator is discarded removes from Installed System Memory, the meter of described cleaning threshold Calculation method includes:
Calculate the sum of the described service processes EMS memory occupation desired value being currently running in Installed System Memory;
The total amount using Installed System Memory deducts the sum of described service processes EMS memory occupation desired value, then deducts default Adjusted value, obtain described cleaning threshold;
If detect described service processes EMS memory occupation desired value and change, according to after changing EMS memory occupation desired value and recalculate described cleaning threshold.
6. the device of an internal memory optimization, it is characterised in that device includes:
Service processes unit, during running at foreground program, detection is used for transferring and holding in running The state of the service processes of row resource file, wherein, described resource file is furnished with at least two varied in size Copy;
End of service unit, for when having detected that service processes suspends, terminates this service processes;
Copy selects unit, for when service processes calling resource file having been detected, obtains system current EMS memory occupation state, transfer, according to described EMS memory occupation state, the copy that this resource file is appropriately sized;
Copy releasing unit, is used for when the resource file copy described service processes being detected is finished, Discharge this resource file copy.
Device the most according to claim 6, it is characterised in that described end of service unit is used for examining Survey whether described service processes is currently in use resource file;If described service processes does not use resource file, Judge that described service processes suspends;If described service processes is currently in use resource file, continue to detect this resource Whether file is in system background;If this resource file is in system background, it is determined that described service processes suspends.
Device the most according to claim 6, it is characterised in that described copy selects unit to be used for obtaining Take the free memory value of system spare;By the copy of described resource file according to data volume order from big to small Sequence;Judge whether the copy of described resource file is less than the free memory value of described system spare successively;If It is that the most described copy selects unit to be additionally operable to transfer first free memory value less than described system spare Described copy.
Device the most according to claim 6, it is characterised in that include that internal memory clears up unit;Described Copy releasing unit is for obtaining the use state of described resource file, according to described this money of use condition adjudgement Whether source file is finished;If it is determined that this resource file is finished, it is set to discard by its status indicator; Described internal memory cleaning unit, will after being less than, in usable levels Installed System Memory being detected, the cleaning threshold preset The described resource file that status indicator is discarded removes from Installed System Memory.
Device the most according to claim 9, it is characterised in that described service processes includes presetting EMS memory occupation desired value;Described deposit cleaning unit for calculate be currently running in Installed System Memory described service into The sum of journey EMS memory occupation desired value;The total amount using Installed System Memory deducts the expection of described service processes EMS memory occupation The sum of value, then deduct default adjusted value, obtain described cleaning threshold;Described internal memory cleaning unit is additionally operable to Detect described service processes EMS memory occupation desired value and when changing, according to the described internal memory after changing Take desired value and recalculate described cleaning threshold.
CN201610195785.1A 2016-03-30 2016-03-30 Memory optimization method and device Pending CN105893149A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610195785.1A CN105893149A (en) 2016-03-30 2016-03-30 Memory optimization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610195785.1A CN105893149A (en) 2016-03-30 2016-03-30 Memory optimization method and device

Publications (1)

Publication Number Publication Date
CN105893149A true CN105893149A (en) 2016-08-24

Family

ID=57014126

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610195785.1A Pending CN105893149A (en) 2016-03-30 2016-03-30 Memory optimization method and device

Country Status (1)

Country Link
CN (1) CN105893149A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804223A (en) * 2018-05-16 2018-11-13 努比亚技术有限公司 Memory Optimize Method, mobile terminal and computer readable storage medium
CN109726076A (en) * 2018-12-03 2019-05-07 百度在线网络技术(北京)有限公司 A kind of small routine life cycle management method and system
CN110321224A (en) * 2019-07-04 2019-10-11 深圳市康冠技术有限公司 Terminal memory method for cleaning, device and computer readable storage medium
CN110347434A (en) * 2019-05-31 2019-10-18 口碑(上海)信息技术有限公司 A kind of processing method and device for calculating equipment application
CN118227423A (en) * 2024-05-23 2024-06-21 四川天邑康和通信股份有限公司 Method and device for monitoring process state in Linux system, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102479108A (en) * 2010-11-26 2012-05-30 中国科学院声学研究所 A multi-application process embedded system terminal resource management system and method
WO2013032504A1 (en) * 2011-09-01 2013-03-07 Microsoft Corporation Event aggregation for background work execution
CN103677942A (en) * 2013-12-30 2014-03-26 Tcl集团股份有限公司 Method and device for browsing network pictures at mobile terminal
CN104008062A (en) * 2013-02-25 2014-08-27 腾讯科技(深圳)有限公司 Internal memory management method and internal memory management device
CN104142828A (en) * 2014-07-30 2014-11-12 北京奇虎科技有限公司 Application acceleration method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102479108A (en) * 2010-11-26 2012-05-30 中国科学院声学研究所 A multi-application process embedded system terminal resource management system and method
WO2013032504A1 (en) * 2011-09-01 2013-03-07 Microsoft Corporation Event aggregation for background work execution
CN104008062A (en) * 2013-02-25 2014-08-27 腾讯科技(深圳)有限公司 Internal memory management method and internal memory management device
CN103677942A (en) * 2013-12-30 2014-03-26 Tcl集团股份有限公司 Method and device for browsing network pictures at mobile terminal
CN104142828A (en) * 2014-07-30 2014-11-12 北京奇虎科技有限公司 Application acceleration method and device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804223A (en) * 2018-05-16 2018-11-13 努比亚技术有限公司 Memory Optimize Method, mobile terminal and computer readable storage medium
CN109726076A (en) * 2018-12-03 2019-05-07 百度在线网络技术(北京)有限公司 A kind of small routine life cycle management method and system
CN109726076B (en) * 2018-12-03 2023-01-06 百度在线网络技术(北京)有限公司 Applet life cycle management method and system
CN110347434A (en) * 2019-05-31 2019-10-18 口碑(上海)信息技术有限公司 A kind of processing method and device for calculating equipment application
CN110321224A (en) * 2019-07-04 2019-10-11 深圳市康冠技术有限公司 Terminal memory method for cleaning, device and computer readable storage medium
CN118227423A (en) * 2024-05-23 2024-06-21 四川天邑康和通信股份有限公司 Method and device for monitoring process state in Linux system, electronic equipment and storage medium
CN118227423B (en) * 2024-05-23 2024-07-19 四川天邑康和通信股份有限公司 Method and device for monitoring process state in Linux system, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN105893149A (en) Memory optimization method and device
CN106095363B (en) Terminal jamming improvement method and device and terminal
CN106445414B (en) Method and system for expanding available storage space of terminal equipment
CN103176842B (en) background process management method and mobile terminal thereof
CN110520819A (en) Real-time frequency controls in frame
CN109343965A (en) Resource adjustment method, device, cloud platform and server
CN104298613A (en) Method for cleaning up system memory and terminal device
CN107623642A (en) A kind of message traffic control method and device
CN107835515A (en) A kind of method for distributing bandwidth resources and base station
CN107562386A (en) A kind of method for writing data and device of distributed storage cluster
CN109684090A (en) A kind of resource allocation methods and device
CN107273182A (en) A kind of resources of virtual machine dynamic expanding method and system
CN104424333A (en) Method and system for loading table data
CN105824673A (en) Method and device for operating application program
CN103491171A (en) Network resource asynchronous loading method and device
CN106204109B (en) Media file pulls method and apparatus
CN105718028A (en) Power-saving method and device based on power consumption application recognition
CN107395490A (en) Method, device, storage medium and electronic device for sending multimedia message
CN116366653A (en) Optimal distribution method, device and storage medium of cloud mobile phone based on cloud mobile phone device
CN109167761B (en) Method and device for automatically processing request
CN101515888B (en) Port mapping method and device
CN105824533B (en) A kind of picture loading method, device and terminal
CN107368351A (en) A kind of automatic upgrade expanding method of virtual machine configuration and device
CN105677487B (en) A kind of method and device controlling resource occupation
CN106019163B (en) A kind of power battery high tension loop self checking method, apparatus and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160824