CN104866237A - Terminal - Google Patents

Terminal Download PDF

Info

Publication number
CN104866237A
CN104866237A CN201510234142.9A CN201510234142A CN104866237A CN 104866237 A CN104866237 A CN 104866237A CN 201510234142 A CN201510234142 A CN 201510234142A CN 104866237 A CN104866237 A CN 104866237A
Authority
CN
China
Prior art keywords
internal memory
programming
target area
moving object
type
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
CN201510234142.9A
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.)
Shenzhen Jinli Communication Equipment Co Ltd
Original Assignee
Shenzhen Jinli Communication Equipment 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 Shenzhen Jinli Communication Equipment Co Ltd filed Critical Shenzhen Jinli Communication Equipment Co Ltd
Priority to CN201510234142.9A priority Critical patent/CN104866237A/en
Publication of CN104866237A publication Critical patent/CN104866237A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System (AREA)

Abstract

The embodiment of the invention discloses a terminal. The terminal comprises an input unit used for receiving a cleaning instruction used for triggering cleaning pre-set memory, an analytical unit used for responding to the cleaning instruction, a selecting unit used for selecting an object region out of pre-set memory, and a mobile unit used for moving mobile objects referenced by a first kind of programs to the object region and for freeing memory took up by mobile objects referenced via the first kind of programs prior to movement. In the pre-set memory, mobile objects referenced by the first kind of programs and mobile objects referenced by the second kind of programs are analyzed. User engagement of the first kind of programs is less than or equal to the pre-set engagement threshold value. User engagement of the second kind of programs is above the pre-set engagement threshold value.By adoption of the invention, influence upon programs with high user engagement degree in operation is reduced when the pre-set memory is cleaned.

Description

A kind of terminal
Technical field
The present invention relates to memory management field, particularly relate to a kind of terminal.
Background technology
Garbage reclamation mechanism (Garbage Collection, GC) two important missions are had: one is Memory recycle, management through figures is carried out to each object in internal memory, when namely an object is no longer counted as 0 by program reference, heap space shared by it just can reclaim, and uses to distribute to new object; Another one piles fragment management exactly, and application program may require further to generate new memory object in operational process, after long internal memory generation, cleaning, can there is a lot of heap fragments in internal memory.
Generally carry out the management of heap fragment by the mode that compression is collected or copy is collected in prior art, thus realize heap fragment at random to collect a continuous print region of memory, increase the utilization ratio of memory headroom.
But, be no matter that compression is collected or copy is collected, due to collected be all the moving object be cited, namely its quote by the application program run, corresponding application program can be stopped the transfer that operation just can complete its refers to.Moving object has shifted rear ability by application recovery, if application program time out of service is longer, obviously can reduce Consumer's Experience.
Summary of the invention
Embodiments provide a kind of terminal, can realize presetting in the process of internal memory in cleaning, reduce the impact on the high program of the user interactions degree operated in described default internal memory.
The embodiment of the invention discloses a kind of terminal, this terminal comprises:
Input block, for receiving cleaning instruction, described cleaning instruction presets internal memory for triggering cleaning;
Analytic unit, for responding described cleaning instruction, in described default internal memory, analyzes the moving object quoted by type 1 programming and the moving object quoted by type 2 programming; The user interactions degree of described type 1 programming is less than or equal to default interactive degree threshold value; The user interactions degree of described type 2 programming is higher than described default interactive degree threshold value;
Selection unit, for selecting target area from described default internal memory;
Mobile unit, for being moved to described target area by described by the moving object that type 1 programming is quoted, and by the described moving object quoted by type 1 programming before the movement shared internal memory discharge.
Implement the embodiment of the present invention, preset in the process of internal memory in cleaning, type 1 programming in described default internal memory and type 2 programming is operated in by analyzing, and moving object type 1 programming quoted moves to target area, discharge the internal memory that moving object that described type 1 programming quotes is shared before the movement afterwards, can realize when carrying out defragmentation to default internal memory, reduce the impact on the high program of the user interactions degree operated in described default internal memory, improve Consumer's Experience.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the process flow diagram of the first embodiment of the EMS memory management process that the embodiment of the present invention provides;
Fig. 2 is the process flow diagram of the second embodiment of the EMS memory management process that the embodiment of the present invention provides;
Fig. 2 A is the schematic diagram that traversal that the embodiment of the present invention provides presets internal memory;
Fig. 3 is the process flow diagram of the 3rd embodiment of the EMS memory management process that the embodiment of the present invention provides;
Fig. 4 is the structural representation of the first embodiment of the terminal that the embodiment of the present invention provides;
Fig. 5 is the structural representation of the second embodiment of the terminal that the embodiment of the present invention provides;
Fig. 6 is the structural representation of the 3rd embodiment of the terminal that the embodiment of the present invention provides;
Fig. 7 is the structural representation of the 4th embodiment of the terminal that the embodiment of the present invention provides;
Fig. 8 is the structural representation of the 5th embodiment of the terminal that the embodiment of the present invention provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
See Fig. 1, be the process flow diagram of the first embodiment of the EMS memory management process that the embodiment of the present invention provides, the method comprises:
Step S101: receive cleaning instruction.
Concrete, described cleaning instruction presets internal memory for triggering cleaning.
In the embodiment of the present invention, described cleaning instruction can be the instruction of the internal memory cleaning button generation that user's triggering terminal system provides, such as, and the cleaning button in the drop-down menu on notifications hurdle, the cleaning button in desktop, the cleaning button arranged in the page.In the embodiment of the present invention, described cleaning instruction also can be the instruction triggering the internal memory cleaning button generation that third-party application provides.In the embodiment of the present invention, described cleaning instruction can also be that the system internal memory that section (as screen locking, without moment such as foreground application operations) triggers automatically at one's leisure clears up instruction.In the embodiment of the present invention, described cleaning instruction can also be the internal memory cleaning instruction that system triggers at user's setting-up time.In practical application, the trigger condition that system performs internal memory cleaning can also be other forms of condition, should not form restriction.
Step S103: respond described cleaning instruction, in described default internal memory, analyzes moving object that type 1 programming quotes and the moving object that type 2 programming is quoted.
Concrete, the user interactions degree of described type 1 programming can less than or equal to default interactive degree threshold value; The user interactions degree of described type 2 programming can higher than described default interactive degree threshold value.
Intelligible, the program that user interactions degree is high needs to receive continually the data of user's input or exports data to user, or operates in foreground.Such as, keypad input event handling procedure.Again such as, terminal screen refurbishing procedure.Again such as, streaming media playing program.Example is only a kind of implementation of the embodiment of the present invention, can be different in actual use, should not form restriction.
Needs illustrate, the described default interactive degree threshold value that the embodiment of the present invention relates to can refer to the frequency threshold value of program input/output port of occupied terminal within the unit interval.The described default interactive degree threshold value that the embodiment of the present invention relates to also can refer to the time span threshold value of the input/output port of program occupied terminal.The described default interactive degree threshold value that the embodiment of the present invention relates to can also refer to the time span threshold value that program operates in foreground.For the metering method of the user interactions degree of program, the embodiment of the present invention is not restricted.
In specific implementation, terminal can be corresponding according to the moving object in described default internal memory the running status of program or input/output port take situation, analyze moving object that the described type 1 programming in described default internal memory quotes and the moving object that described type 2 programming is quoted.Such as, described default interactive degree threshold value to be the number of times of the input/output port of occupied terminal in the unit interval the be frequency threshold value of 10 times.So, the moving object that the program that the number of times of the input/output port of occupied terminal is less than 10 times within the unit interval is quoted can analyze the moving object quoted for described type 1 programming.
Preferably, described type 1 programming can be the current program not taking input/output port, and described type 1 programming also can be the program operating in backstage.Needs illustrate, described type 2 programming can be the data services of default real-time Communication for Power, such as, and the data syn-chronization program of talk business.
Step S105: select target area from default internal memory.
Concrete, described target area is for depositing the moving object after moving.The capacity of described target area can be more than or equal to capacity shared by the full-motion object in described default internal memory.Described default internal memory can be the whole internal memory of terminal, also can be the partial memory of terminal, not be restricted here.
Intelligible, operate in moving object that the application program in described default internal memory quotes scattered be distributed in described default internal memory, therefore, remaining in described default internal memory can storage allocation also be scattered internal memory fragment.
In specific implementation, described target area can be any one section of region of memory of described default internal memory, in order to deposit the moving object to be moved outside described target area, the space that the moving object be moved is taken before the movement forms comparatively continuous print after discharge can storage allocation fragment.Such as, described target area can be the storage area of the high address end of described default internal memory.Again such as, described target area can be the storage area of the low address end of described default internal memory.Example is only a kind of implementation of the embodiment of the present invention, can be different in actual use, should not form restriction.
Preferably, described target area can be make the moving object outside described target area move to one section of minimum storage area of traveling time wherein in described default internal memory.
Preferably, described target area can be the blank storage area of a section in described default internal memory, and the moving object after being moved to make described target area is filled up.
Preferably, described target area can be comprise one section of maximum storage area of moving object that described type 2 programming quotes in described default internal memory, after the moving object quoted with the described type 1 programming realized outside described target area is all moved into described target area, the storage space outside described target area can be formed and compare continuous print internal memory fragment.
Step S107: the moving object that described type 1 programming is quoted is moved to described target area, and the moving object that described type 1 programming is quoted shared internal memory release before the movement.
Concrete, after selecting described target area, the moving object that type 1 programming is quoted can be filled in described target area by terminal.
In specific implementation, terminal can fill described target area continuously according to the order from low address to high address.Such as, target area is the storage area of address " 0X0000-0X00FF ", then moving object to be moved can be filled by terminal from low address " 0X0000 " place.In specific implementation, terminal can also fill described target area continuously according to the order from high address to low address, is not restricted here.
In specific implementation, in the moving object that described type 1 programming is quoted, terminal can select moving object to be moved according to address sequence.Such as, paramountly store object A and object B successively in the storage space " 0X0000-0X0020 " outside described target area from low, then terminal can first mobile object A, then mobile object B.
In specific implementation, in described default internal memory, if there is the moving object only having described type 1 programming to quote in the internal memory fragment of preset capacity, the moving object that described type 1 programming in the internal memory fragment of then preferential this preset capacity mobile of terminal is quoted, with realize in default internal memory high efficiency vacate one section of continuous print can storage allocation fragment.Such as, if there is the moving object only having described type 1 programming to quote in 1,000,000 internal memory fragments in described default internal memory, then terminal preferentially moves the moving object that the described type 1 programming in this 1,000,000 storage area is quoted.
Further, before execution step S107, terminal can also judge whether to comprise in described target area the moving object that described type 1 programming is quoted, if, then the moving object that the described type 1 programming in described target area is quoted is moved to one end of described target area, fill described target area in order to continuous print.In specific implementation, the moving object that described type 1 programming in described target area can be quoted by terminal moves to the high address end of described target area, also the moving object described type 1 programming in described target area can quoted moves to the low address end of described target area, is not restricted here.
In addition, after execution step S101, terminal can also discharge internal memory shared by the garbage object in described default internal memory.
In specific implementation, terminal can use reference count method to manage the garbage object in described default internal memory.Such as in reference count gatherer, obtain the count value etc. of each object, the object being counted as 0 is reclaimed.For an object in described default internal memory, when there being its dependent variable to be assigned quoting of this object, its counting adds 1; When quoting of this object has exceeded life cycle or be set to new value, its counting subtracts 1; When it is counted as 0, this object is considered to garbage object, will be recovered.
In specific implementation, terminal can also use tracking to manage the garbage object in described default internal memory.Such as, in tracking gatherer, unlabelled memory object is reclaimed.Example is only a kind of implementation of the embodiment of the present invention, can be different in actual use, should not form restriction.
See Fig. 2, be the process flow diagram of the second embodiment of the EMS memory management process that the embodiment of the present invention provides, the method comprises:
Step S201: receive cleaning instruction.
Concrete, see the content in the step S101 of Fig. 1 embodiment, can repeat no more here.
Step S203: respond described cleaning instruction, in described default internal memory, analyzes moving object that type 1 programming quotes and the moving object that type 2 programming is quoted.
Concrete, see the content in the step S103 of Fig. 1 embodiment, can repeat no more here.
Step S205: the size traveled through in described default internal memory equals the internal memory fragment of the capacity of described target area.
Concrete, the capacity of described target area is more than or equal to internal memory shared by the full-motion object in described default internal memory.The capacity of described target area is less than the capacity of described default internal memory.
In specific implementation, as shown in Figure 2 A, described default internal memory comprises a N continuous byte (Byte), and described target area comprises a continuous N byte (Byte), and wherein, N and M is positive integer, and N is greater than M.Intelligible, if traversal step-length is 1 byte, then illustrate the internal memory fragment including (N-M+1) individual diagram continuous N byte in a N continuous byte.That is, terminal needs to travel through (N-M+1) the individual internal memory fragment in described default internal memory.
Needs illustrate, when traveling through described default internal memory, terminal also can choose two bytes as traversal step-length.That is, terminal needs to travel through (the N-M+1)/2 internal memory fragment in described default internal memory.Such as, the 1st byte to M byte is the 1st internal memory fragment, and the 3rd byte to M+2 byte is the 2nd internal memory fragment.In practical application, when traveling through described default internal memory, terminal can also choose the traversal step-length of other sizes, is not restricted here.
Step S207: the number calculating the moving object that the described type 2 programming that comprises in described internal memory fragment is quoted separately.
Concrete, the size comprised in described default internal memory is equaled to the internal memory fragment of described target area, such as, (N-M+1) shown in Fig. 2 A individual internal memory fragment, terminal can calculate in internal memory fragment described in each number of the moving object that the described type 2 programming that comprises is quoted respectively.Such as, as shown in Figure 2 A, terminal can calculate the number of the moving object that each self-contained described type 2 programming is quoted in (N-M+1) individual internal memory fragment respectively.
Step S209: internal memory fragments maximum for the number including the moving object that type 2 programming is quoted is chosen to be described target area.
Concrete, for example, as shown in Figure 2 A, if the number of the moving object that the type 2 programming comprised in the 1st internal memory fragment in described (N-M+1) individual internal memory fragment is quoted is maximum, then the 1st internal memory fragment in described (N-M+1) individual internal memory fragment is chosen to be described target area.Intelligible, the moving object that the type 2 programming comprised in selected target area is quoted is more, the moving object that type 2 programming outside target area is quoted is then fewer, after the moving object quoted in described type 1 programming is moved in target area, the memory fragmentation outside target area is fewer.
Step S211: the moving object that described type 1 programming is quoted is moved to described target area, and the moving object that described type 1 programming is quoted shared internal memory release before the movement.
Concrete, see the content in the step S107 of Fig. 1 embodiment, can repeat no more here.
Step S213: whether the monitoring described type 2 programming operated in described target area becomes described type 1 programming.
Intelligible, according to abovementioned steps S205 to step S209, include the moving object that described type 2 programming is quoted in described target area, described target area can be separated into discrete memory fragmentation by the moving object that described type 2 programming is quoted.Running status based on program is dynamic, when the user interactions degree operating in the described type 2 programming in described target area is reduced to the interactive degree threshold value lower than pre-setting, terminal can judge that the described type 2 programming operated in described target area becomes described type 1 programming.
Concrete, when operating in the described type 2 programming in described target area and becoming described type 1 programming, can step S215 be performed, otherwise can perform step S217, in practical application, all right repeated execution of steps S213, is not restricted here.
Step S215: the one end moving object that the described type 2 programming being transformed into described type 1 programming is quoted being moved to described target area.
Concrete, when operating in the described type 2 programming in described target area and becoming described type 1 programming, then the moving object that the described type 2 programming becoming described type 1 programming is quoted is moved to one end of described target area, in order to arrange the memory fragmentation in described target area, form continuous print empty storage space.The continuous empty storage space arranging out in described target area can be used for the moving object to be moved stored continuously outside described target area.
Step S217: whether the monitoring described type 2 programming operated in outside described target area becomes described type 1 programming.
Intelligible, the running status of program is dynamic.When the user interactions degree operating in the described type 2 programming outside described target area is reduced to the interactive degree threshold value lower than pre-setting, the described type 2 programming operated in described in terminal can judge outside described target area becomes described type 1 programming.
Concrete, when operating in the described type 2 programming outside described target area and becoming described type 1 programming, step S219 can be performed, in order to further to arrange the memory fragmentation outside described target area, otherwise, can repeated execution of steps S217, in practical application, other operations can also be performed, be not restricted here.
Step S219: the moving object that the described type 2 programming being transformed into described type 1 programming is quoted is moved to described target area.
Concrete, when terminal monitoring becomes described type 1 programming to there being the described type 2 programming operated in outside described default internal memory, then terminal can become moving object that described type 1 programming quotes and move to one end of described target area, in order to further to arrange the memory fragmentation outside described target area.For its move mode, see the content in step S107, can repeat no more here.
Needs illustrate, terminal also first can perform step S217, then performs step S213, and terminal is passable performs step S217 and step S213 concurrently.For the execution sequence of step S217 and step S213, the embodiment of the present invention is not restricted.
Implement the embodiment of the present invention, the internal memory fragment of the capacity of target area is equaled by the size traveled through in default internal memory, and choose from described internal memory fragment and comprise the maximum internal memory fragment of moving object that type 2 programming quotes as target area, afterwards the moving object that the type 1 programming in described default internal memory is quoted is moved in described target area, can realize after the moving object described type 1 programming quoted is moved in target area, the memory fragmentation outside target area is minimum.
See Fig. 3, be the process flow diagram of the 3rd embodiment of the EMS memory management process that the embodiment of the present invention provides, the method comprises:
Step S301: receive cleaning instruction.
Concrete, see the content in the step S101 of Fig. 1 embodiment, can repeat no more here.
Step S303: respond described cleaning instruction, in described default internal memory, analyzes moving object that type 1 programming quotes and the moving object that type 2 programming is quoted.
Concrete, see the content in the step S103 of Fig. 1 embodiment, can repeat no more here.
Step S305: the size traveled through in described default internal memory equals the internal memory fragment of the capacity of described target area.
Concrete, see the content in the step S205 of Fig. 2 embodiment, can repeat no more here.
Step S307: the moving object calculated separately outside described internal memory fragment moves to the traveling time total amount of described internal memory fragment.
Concrete, the size comprised in described default internal memory is equaled to the internal memory fragment of described target area, such as, (N-M+1) shown in Fig. 2 A individual internal memory fragment, terminal the moving object calculated respectively outside internal memory fragment described in each can move to the traveling time total amount of described internal memory fragment.Optionally, in specific implementation, terminal can calculate the traveling time total amount that moving object that the described type 1 programming outside internal memory fragment described in each quotes moves to described internal memory fragment respectively.
Needs illustrate, the traveling time of the moving object that the embodiment of the present invention relates to can be directly proportional to the mobile number of times of this moving object.That is, the moving object outside described target area is overstepping the bounds of propriety loose, and the traveling time that the moving object outside described target area all moves in described target area is more.Practical application, the traveling time of moving object can also be relevant with other factors, is not restricted here.
Step S309: described internal memory fragment minimum for the traveling time total amount of correspondence is chosen to be described target area.
Concrete, for example, as shown in Figure 2 A, if the moving object outside the 1st internal memory fragment in described (N-M+1) individual internal memory fragment moves to the consuming time minimum of the 1st internal memory fragment, then the 1st internal memory fragment in described (N-M+1) individual internal memory fragment is chosen to be described target area.Intelligible, when carrying out defragmentation to described default internal memory, mobile moving object is consuming time fewer, less on the impact of the program operated in described default internal memory.
Step S311: the moving object that described type 1 programming is quoted is moved to described target area, and the moving object that described type 1 programming is quoted shared internal memory release before the movement.
Concrete, see the content in the step S107 of Fig. 1 embodiment, can repeat no more here.
Step S313: whether the monitoring described type 2 programming operated in described target area becomes described type 1 programming.
Intelligible, according to abovementioned steps S305 to step S309, may include the moving object that described type 2 programming is quoted in described target area, described target area can be separated into discrete memory fragmentation by the moving object that described type 2 programming is quoted.Running status based on program is dynamic, when the user interactions degree operating in the described type 2 programming in described target area is reduced to the interactive degree threshold value lower than pre-setting, terminal can judge that the described type 2 programming operated in described target area becomes described type 1 programming.
Concrete, when operating in the described type 2 programming in described target area and becoming described type 1 programming, can step S315 be performed, otherwise can perform step S317, in practical application, all right repeated execution of steps S313, is not restricted here.
Step S315: the one end moving object that the described type 2 programming being transformed into described type 1 programming is quoted being moved to described target area.
Concrete, when operating in the described type 2 programming in described target area and becoming described type 1 programming, then the moving object that the described type 2 programming becoming described type 1 programming is quoted is moved to one end of described target area, in order to arrange the memory fragmentation in described target area, form continuous print empty storage space.The continuous empty storage space arranging out in described target area can be used for the moving object to be moved stored continuously outside described target area.
Step S317: whether the monitoring described type 2 programming operated in outside described target area becomes described type 1 programming.
Concrete, see the content in the step S217 of Fig. 2 embodiment, can repeat no more here.
Step S319: the moving object that the described type 2 programming being transformed into described type 1 programming is quoted is moved to described target area.
Concrete, see the content in the step S219 of Fig. 2 embodiment, can repeat no more here.
Preferably, in the embodiment of the present invention, when choosing described target area, the terminal size that can also travel through in described default internal memory equals the internal memory fragment of the capacity of described target area, and equal the internal memory fragment of the capacity of described target area from described size, select the blank internal memory fragment that size equals the capacity of described target area.If select multiple described blank internal memory fragment, the terminal moving object that can calculate separately outside described blank internal memory fragment moves to the traveling time total amount of described blank internal memory fragment, and described blank internal memory fragment minimum for the traveling time total amount of correspondence is chosen to be described target area.
Intelligible, described target area is blank, can realize described target area be moved after the reference object Coutinuous store of described type 1 programming, can not memory fragmentation be there is.Further, the time that the moving object outside described blank internal memory fragment moves to described blank internal memory fragment is fewer, less on the impact of the program operated in described default internal memory.
Preferably, in the embodiment of the present invention, when choosing described target area, the terminal size that can also travel through in described default internal memory equals the internal memory fragment of the capacity of described target area, and equal the internal memory fragment of the capacity of described target area from described size, select size and equal the capacity of described target area and do not comprise the internal memory fragment of the moving object that described type 2 programming is quoted.If select multiple described internal memory fragment, do not comprise the traveling time total amount of the internal memory fragment of the moving object that described type 2 programming is quoted described in the moving object do not comprised outside the internal memory fragment of the moving object that described type 2 programming is quoted described in terminal can calculate separately moves to, and the internal memory fragment not comprising the moving object that described type 2 programming is quoted described in minimum for corresponding traveling time total amount is chosen to be described target area.
Intelligible, do not comprise the moving object that described type 2 programming is quoted in described target area, can realize described target area be moved after the reference object Coutinuous store of described type 1 programming, can not memory fragmentation be there is.Further, the time that the moving object outside described blank internal memory fragment moves to described blank internal memory fragment is fewer, less on the impact of the program operated in described default internal memory.
Further, in above-mentioned two kinds of preferred implementations, the sustainable execution step S317 of terminal, in order to arrange the memory fragmentation outside described target area, that is: moves to described target area by the moving object that the described type 2 programming being transformed into described type 1 programming is quoted.
Implement the embodiment of the present invention, the internal memory fragment of the capacity of target area is equaled by the size traveled through in default internal memory, and from described internal memory fragment, choose the minimum internal memory fragment of traveling time corresponding to moving object as target area, afterwards the moving object that the type 1 programming in described default internal memory is quoted is moved in described target area, can realize being moved in target area in the moving object that described type 1 programming is quoted, minimum on the impact operating in described default internal memory Program.
See Fig. 4, be the structural representation of the first embodiment of terminal provided by the invention, terminal 40 as shown in Figure 4 can comprise: input block 401, selection unit 403, analytic unit 405 and mobile unit 407.Wherein:
Input block 401, for receiving cleaning instruction, described cleaning instruction presets internal memory for triggering cleaning;
Analytic unit 405, for responding described cleaning instruction, in described default internal memory, analyzes the moving object quoted by type 1 programming and the moving object quoted by type 2 programming; The user interactions degree of described type 1 programming is less than or equal to default interactive degree threshold value; The user interactions degree of described type 2 programming is higher than described default interactive degree threshold value;
Selection unit 403, for selecting target area from described default internal memory;
Mobile unit 407, for being moved to described target area by described by the moving object that type 1 programming is quoted, and by the described moving object quoted by type 1 programming before the movement shared internal memory discharge.
Concrete, described type 1 programming can comprise: the current program not taking input/output port; Or, operate in the program on backstage.The capacity of described target area is more than or equal to internal memory shared by the full-motion object in described default internal memory.
In the embodiment of the present invention, selection unit 403 can comprise: the first Traversal Unit, the first computing unit and the first determining unit.Wherein:
Described first Traversal Unit, equals the internal memory fragment of the capacity of described target area for the size traveled through in described default internal memory;
Described first computing unit, for calculating the number of the moving object that the described type 2 programming that comprises in described internal memory fragment is quoted separately;
Described first determining unit, for being chosen to be described target area by internal memory fragments maximum for the number including the moving object that type 2 programming is quoted.
In the embodiment of the present invention, selection unit 403 also can comprise: the second Traversal Unit, the second computing unit and the second determining unit.Wherein:
Described second Traversal Unit, equals the internal memory fragment of the capacity of described target area for the size traveled through in described default internal memory;
Described second computing unit, moves to the traveling time total amount of described internal memory fragment for the moving object calculated separately outside described internal memory fragment;
Described second determining unit, for being chosen to be described target area by described internal memory fragment minimum for the traveling time total amount of correspondence.
In the embodiment of the present invention, selection unit 403 can also comprise: the 3rd Traversal Unit, the first screening unit, the 3rd computing unit and the 3rd determining unit.Wherein:
Described 3rd Traversal Unit, equals the internal memory fragment of the capacity of described target area for the size traveled through in described default internal memory;
Described first screening unit, for equaling in the internal memory fragment of the capacity of described target area from described size, selects the blank internal memory fragment that size equals the capacity of described target area;
Described 3rd computing unit, moves to the traveling time total amount of described blank internal memory fragment for the moving object calculated separately outside described blank internal memory fragment;
Described 3rd determining unit, for being chosen to be described target area by described blank internal memory fragment minimum for the traveling time total amount of correspondence.
In the embodiment of the present invention, selection unit 403 can comprise again: the 4th Traversal Unit, the second screening unit, the 4th computing unit and the 4th determining unit.Wherein:
Described 4th Traversal Unit, equals the internal memory fragment of the capacity of described target area for the size traveled through in described default internal memory;
Described second screening unit, for equaling from described size in the internal memory fragment of the capacity of described target area, selecting size and equals the capacity of described target area and do not comprise the internal memory fragment of the moving object that described type 2 programming is quoted;
Described 4th computing unit, does not comprise the traveling time total amount of the internal memory fragment of the moving object that described type 2 programming is quoted for the moving object do not comprised outside the internal memory fragment of the moving object that described type 2 programming is quoted described in calculating separately described in moving to;
Described 4th determining unit, for being chosen to be described target area by the internal memory fragment not comprising the moving object that described type 2 programming is quoted described in minimum for corresponding traveling time total amount.
See Fig. 5, it is the structural representation of the second embodiment of terminal provided by the invention, terminal 40 is as shown in Figure 5 comprising: input block 401, selection unit 403, outside analytic unit 405 and mobile unit 407, also can comprise: judging unit 409, first arranges unit 411 and clearing cell 413, wherein:
Judging unit 409, before the moving object that described type 1 programming is quoted being moved to described target area at mobile unit 407, judges whether to comprise in described target area the moving object that described type 1 programming is quoted;
First arranges unit 411, for when the Output rusults of judging unit 409 is for being, the moving object that the described type 1 programming in described target area is quoted is moved to one end of described target area.
Clearing cell 413, after receiving cleaning instruction at input block 401, discharges internal memory shared by the garbage object in described default internal memory.
See Fig. 6, it is the structural representation of the 3rd embodiment of terminal provided by the invention, terminal 40 is as shown in Figure 6 comprising: input block 401, selection unit 403, analytic unit 405, outside mobile unit 407 and clearing cell 413, also can comprise: the first monitoring means 415 and second arranges unit 417.Wherein:
First monitoring means 415, after the moving object that described type 1 programming is quoted being moved to described target area at mobile unit 407, whether the monitoring described type 2 programming operated in described target area becomes described type 1 programming;
Second arranges unit 417, for when the monitoring result of the first monitoring means 415 is for being, the moving object that the described type 2 programming being transformed into described type 1 programming is quoted is moved to one end of described target area.
In the embodiment of the present invention, terminal 40 can also further comprise as shown in Figure 7: the second monitoring means 419, after the moving object that described type 1 programming is quoted being moved to described target area at mobile unit 407, whether the monitoring described type 2 programming operated in outside described target area becomes described type 1 programming, if so, then trigger mobile unit 407 and the moving object that the described type 2 programming being transformed into described type 1 programming is quoted is moved to described target area.
Will be understood that, in terminal 40, the function of each functional module according to the method specific implementation in the embodiment of the method for above-mentioned Fig. 1 to Fig. 3, can repeat no more here.
See Fig. 8, it is the structural representation of the 5th embodiment of terminal provided by the invention.Wherein, as shown in Figure 8, this terminal 100 can comprise: at least one processor 1001, such as CPU, at least one bus 1002, at least one input media 1003, at least one output unit 1004, storer 1005.Wherein, bus 1002 is for realizing the communication connection between these assemblies; Input media 1003 can comprise touch-screen (Touch Screen), and optional input media 1003 can also comprise keyboard (Keyboard), or other physical buttons, such as, and volume key; Output unit 1004 can comprise display screen (Display); Storer 1005 can be high-speed RAM storer, also can be non-labile storer (non-volatile memory), such as at least one magnetic disk memory, storer 1005 can also be optionally that at least one is positioned at the memory storage away from aforementioned processor 1001.As shown in Figure 8, operating system, network communication module, Subscriber Interface Module SIM and storage management can be comprised as in a kind of storer 1005 of computer-readable storage medium.
In the terminal 100 shown in Fig. 8, processor 1001 can call the storage management stored in storer 1005, and performs following operation:
Receive cleaning instruction by input media 1003, described cleaning instruction presets internal memory for triggering cleaning;
Respond described cleaning instruction, in described default internal memory, analyze moving object that type 1 programming quotes and the moving object that type 2 programming is quoted; The user interactions degree of described type 1 programming is less than or equal to default interactive degree threshold value; The user interactions degree of described type 2 programming is higher than described default interactive degree threshold value;
Target area is selected from described default internal memory;
The moving object that described type 1 programming is quoted is moved to described target area, and the moving object that described type 1 programming is quoted shared internal memory release before the movement.
Concrete, described type 1 programming can comprise: the current program not taking input/output port; Or, operate in the program on backstage.The capacity of described target area is more than or equal to internal memory shared by the full-motion object in described default internal memory.
In the embodiment of the present invention, when selecting target area from described default internal memory, processor 1001 size that can travel through in described default internal memory equals the internal memory fragment of the capacity of described target area, and calculates the number of the moving object that the described type 2 programming that comprises in described internal memory fragment is quoted separately.Afterwards, internal memory fragments maximum for the number including the moving object that type 2 programming is quoted can be chosen to be described target area by processor 1001.
In the embodiment of the present invention, when selecting target area from described default internal memory, processor 1001 size that can travel through in described default internal memory equals the internal memory fragment of the capacity of described target area, and the moving object calculated separately outside described internal memory fragment moves to the traveling time total amount of described internal memory fragment.Afterwards, described internal memory fragment minimum for the traveling time total amount of correspondence can be chosen to be described target area by processor 1001.
Preferably, in the embodiment of the present invention, when selecting target area from described default internal memory, processor 1001 size that can travel through in described default internal memory equals the internal memory fragment of the capacity of described target area, and equal the internal memory fragment of the capacity of described target area from described size, select the blank internal memory fragment that size equals the capacity of described target area.Afterwards, processor 1001 moving object that can calculate separately outside described blank internal memory fragment moves to the traveling time total amount of described blank internal memory fragment, and described blank internal memory fragment minimum for the traveling time total amount of correspondence is chosen to be described target area.
Preferably, in the embodiment of the present invention, when selecting target area from described default internal memory, processor 1001 size that can travel through in described default internal memory equals the internal memory fragment of the capacity of described target area, and equal the internal memory fragment of the capacity of described target area from described size, select size and equal the capacity of described target area and do not comprise the internal memory fragment of the moving object that described type 2 programming is quoted.Afterwards, do not comprise the traveling time total amount of the internal memory fragment of the moving object that described type 2 programming is quoted described in the moving object do not comprised outside the internal memory fragment of the moving object that described type 2 programming is quoted described in processor 1001 can calculate separately moves to, and the internal memory fragment not comprising the moving object that described type 2 programming is quoted described in minimum for corresponding traveling time total amount is chosen to be described target area.
Further, before the moving object described type 1 programming quoted moves to described target area, processor 1001 can also judge whether to comprise in described target area the moving object that described type 1 programming is quoted, if so, then the moving object that the described type 1 programming in described target area is quoted is moved to one end of described target area.
Further, after reception cleaning instruction, processor 1001 can also discharge internal memory shared by the garbage object in described default internal memory.
Further, after the moving object described type 1 programming quoted moves to described target area, processor 1001 can also be monitored the described type 2 programming operated in described target area and whether be become described type 1 programming, if so, then the moving object that the described type 2 programming being transformed into described type 1 programming is quoted is moved to one end of described target area.
Further, described the moving object that described type 1 programming is quoted moved to described target area after, processor 1001 can also be monitored the described type 2 programming operated in outside described target area and whether be become described type 1 programming, if so, then the moving object that the described type 2 programming being transformed into described type 1 programming is quoted is moved to described target area.
Will be understood that, the step that processor 1001 performs with reference to the specific implementation in above-mentioned Fig. 1 to Fig. 3 embodiment of the method, can also repeat no more here.
Need to illustrate, program involved in above-mentioned full content can also be independent thread, process, or their composition, and the embodiment of the present invention is not restricted.
In sum, implement the embodiment of the present invention, preset in the process of internal memory in cleaning, type 1 programming in described default internal memory and type 2 programming is operated in by analyzing, and moving object type 1 programming quoted moves to target area, discharge the internal memory that moving object that described type 1 programming quotes is shared before the movement afterwards, can realize when carrying out defragmentation to default internal memory, reduce the impact on the high program of the user interactions degree operated in described default internal memory, improve Consumer's Experience.
Module in all embodiments of the present invention or submodule, universal integrated circuit can be passed through, such as CPU (Central Processing Unit, central processing unit), or realized by ASIC (Application SpecificIntegrated Circuit, special IC).
The sequence of steps of the method for the embodiment of the present invention can carry out adjusting, merge or deleting according to actual needs.The module of the terminal of the embodiment of the present invention can carry out integrating according to actual needs, Further Division or delete.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in a computer read/write memory medium, this program, when performing, can comprise the flow process of the embodiment as above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
Above disclosedly be only present pre-ferred embodiments, certainly can not limit the interest field of the present invention with this, therefore according to the equivalent variations that the claims in the present invention are done, still belong to the scope that the present invention is contained.

Claims (10)

1. a terminal, is characterized in that, comprising:
Input block, for receiving cleaning instruction, described cleaning instruction presets internal memory for triggering cleaning;
Analytic unit, for responding described cleaning instruction, in described default internal memory, analyzes the moving object quoted by type 1 programming and the moving object quoted by type 2 programming; The user interactions degree of described type 1 programming is less than or equal to default interactive degree threshold value; The user interactions degree of described type 2 programming is higher than described default interactive degree threshold value;
Selection unit, for selecting target area from described default internal memory;
Mobile unit, for being moved to described target area by described by the moving object that type 1 programming is quoted, and by the described moving object quoted by type 1 programming before the movement shared internal memory discharge.
2. terminal as claimed in claim 1, is characterized in that, the capacity of described target area is more than or equal to internal memory shared by the full-motion object in described default internal memory; Described selection unit, comprising:
First Traversal Unit, equals the internal memory fragment of the capacity of described target area for the size traveled through in described default internal memory;
First computing unit, for calculating the number of the moving object that the described type 2 programming that comprises in described internal memory fragment is quoted separately;
First determining unit, for being chosen to be described target area by internal memory fragments maximum for the number including the moving object that type 2 programming is quoted.
3. terminal as claimed in claim 1, is characterized in that, the capacity of described target area is more than or equal to internal memory shared by the full-motion object in described default internal memory; Described selection unit, comprising:
Second Traversal Unit, equals the internal memory fragment of the capacity of described target area for the size traveled through in described default internal memory;
Second computing unit, moves to the traveling time total amount of described internal memory fragment for the moving object calculated separately outside described internal memory fragment;
Second determining unit, for being chosen to be described target area by described internal memory fragment minimum for the traveling time total amount of correspondence.
4. terminal as claimed in claim 1, is characterized in that, the capacity of described target area is more than or equal to internal memory shared by the full-motion object in described default internal memory; Described selection unit, comprising:
3rd Traversal Unit, equals the internal memory fragment of the capacity of described target area for the size traveled through in described default internal memory;
First screening unit, for equaling in the internal memory fragment of the capacity of described target area from described size, selects the blank internal memory fragment that size equals the capacity of described target area;
3rd computing unit, moves to the traveling time total amount of described blank internal memory fragment for the moving object calculated separately outside described blank internal memory fragment;
3rd determining unit, for being chosen to be described target area by described blank internal memory fragment minimum for the traveling time total amount of correspondence.
5. terminal as claimed in claim 1, is characterized in that, the capacity of described target area is more than or equal to internal memory shared by the full-motion object in described default internal memory; Described selection unit, comprising:
4th Traversal Unit, equals the internal memory fragment of the capacity of described target area for the size traveled through in described default internal memory;
Second screening unit, for equaling from described size in the internal memory fragment of the capacity of described target area, selecting size and equals the capacity of described target area and do not comprise the internal memory fragment of the moving object that described type 2 programming is quoted;
4th computing unit, does not comprise the traveling time total amount of the internal memory fragment of the moving object that described type 2 programming is quoted for the moving object do not comprised outside the internal memory fragment of the moving object that described type 2 programming is quoted described in calculating separately described in moving to;
4th determining unit, for being chosen to be described target area by the internal memory fragment not comprising the moving object that described type 2 programming is quoted described in minimum for corresponding traveling time total amount.
6. terminal as claimed in claim 1, it is characterized in that, also comprise: judging unit, before the moving object that described type 1 programming is quoted being moved to described target area at described mobile unit, judge whether to comprise in described target area the moving object that described type 1 programming is quoted;
First arranges unit, for when the Output rusults of described judging unit is for being, the moving object that the described type 1 programming in described target area is quoted is moved to one end of described target area.
7. terminal as claimed in claim 1, it is characterized in that, described type 1 programming comprises: the current program not taking input/output port; Or, operate in the program on backstage.
8. terminal as claimed in claim 1, is characterized in that, also comprise: clearing cell, after receiving cleaning instruction at described input block, discharges internal memory shared by the garbage object in described default internal memory.
9. terminal as claimed in claim 1, it is characterized in that, also comprise: the first monitoring means, after the moving object that described type 1 programming is quoted being moved to described target area at described mobile unit, whether the monitoring described type 2 programming operated in described target area becomes described type 1 programming;
Second arranges unit, for when the monitoring result of described first monitoring means is for being, the moving object that the described type 2 programming being transformed into described type 1 programming is quoted is moved to one end of described target area.
10. terminal as claimed in any one of claims 1-9 wherein, it is characterized in that, also comprise: the second monitoring means, after the moving object that described type 1 programming is quoted being moved to described target area at described mobile unit, whether the monitoring described type 2 programming operated in outside described target area becomes described type 1 programming, if so, then trigger described mobile unit and the moving object that the described type 2 programming being transformed into described type 1 programming is quoted is moved to described target area.
CN201510234142.9A 2015-05-08 2015-05-08 Terminal Pending CN104866237A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510234142.9A CN104866237A (en) 2015-05-08 2015-05-08 Terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510234142.9A CN104866237A (en) 2015-05-08 2015-05-08 Terminal

Publications (1)

Publication Number Publication Date
CN104866237A true CN104866237A (en) 2015-08-26

Family

ID=53912101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510234142.9A Pending CN104866237A (en) 2015-05-08 2015-05-08 Terminal

Country Status (1)

Country Link
CN (1) CN104866237A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111444116A (en) * 2020-03-23 2020-07-24 海信电子科技(深圳)有限公司 Storage space fragment processing method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1677367A (en) * 2004-03-29 2005-10-05 东芝解决方案株式会社 Storage system and method for controlling block rearrangement
US20070143563A1 (en) * 2005-12-16 2007-06-21 Microsoft Corporation Online storage volume shrink
CN101404028A (en) * 2008-11-07 2009-04-08 宇龙计算机通信科技(深圳)有限公司 Method and system for arranging file chips
US20120324197A1 (en) * 2011-06-20 2012-12-20 Microsoft Corporation Memory management model and interface for unmodified applications
CN103389948A (en) * 2012-05-10 2013-11-13 索尼公司 Device and method for managing memorizer and electronic device
CN103514102A (en) * 2013-10-25 2014-01-15 中国联合网络通信集团有限公司 Memory garbage collecting method and device for Java virtual machine

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1677367A (en) * 2004-03-29 2005-10-05 东芝解决方案株式会社 Storage system and method for controlling block rearrangement
US20070143563A1 (en) * 2005-12-16 2007-06-21 Microsoft Corporation Online storage volume shrink
CN101404028A (en) * 2008-11-07 2009-04-08 宇龙计算机通信科技(深圳)有限公司 Method and system for arranging file chips
US20120324197A1 (en) * 2011-06-20 2012-12-20 Microsoft Corporation Memory management model and interface for unmodified applications
CN103389948A (en) * 2012-05-10 2013-11-13 索尼公司 Device and method for managing memorizer and electronic device
CN103514102A (en) * 2013-10-25 2014-01-15 中国联合网络通信集团有限公司 Memory garbage collecting method and device for Java virtual machine

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111444116A (en) * 2020-03-23 2020-07-24 海信电子科技(深圳)有限公司 Storage space fragment processing method and device

Similar Documents

Publication Publication Date Title
CN104866548A (en) Memory management method
CN101350869B (en) Method and apparatus for removing repeat of telecom charging based on index and hash
CN105740078B (en) Memory management method, device and terminal
CN103098014B (en) Storage system
CN111159436B (en) Method, device and computing equipment for recommending multimedia content
CN108255925A (en) A kind of display methods and its terminal of data list structure alteration
CN105447604A (en) Account processing method and device
US8479024B2 (en) System and method for customizing information handling system internal power source and service offerings based on usage profiles
CN109684071B (en) Distribution of arbitrary workload among super-converged nodes
CN102521145A (en) Java card system and space distribution processing method thereof
CN111813347B (en) Garbage recycling space management method and device and computer readable storage medium
WO2020148342A1 (en) A method and a system for managing the computing resources of a cloud computing platform
CN111258921A (en) Method and device for recycling garbage memory, electronic equipment and storage medium
KR20180108810A (en) Service parameter selection method and associated device
CN114996173B (en) Method and device for managing write operation of storage equipment
CN104866237A (en) Terminal
CN110287000B (en) Data processing method and device, electronic equipment and storage medium
CN104602104A (en) Cache file processing method and digital TV terminal
CN110619008A (en) Database query method and device, electronic equipment and storage medium
CN108920098A (en) A kind of storage management system collects method, system and the equipment of information
US9398441B2 (en) Method and apparatus for identifying re-subscribed user
CN109587075B (en) Service processing method, device, equipment and storage medium
CN109690485B (en) Garbage collection method based on data structure, computer and storage medium
CN107193651B (en) Dual system internal memory sharing method and device
CN109840182A (en) A kind of resource monitoring method, device and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned

Effective date of abandoning: 20190409

AD01 Patent right deemed abandoned