Specific embodiment
In order to make the above objects, features, and advantages of the present application more apparent, with reference to the accompanying drawing and it is specific real
Applying mode, the present application will be further described in detail.
The memory management unit of dynamic language system carries out the management of memory as unit of page, and write-in principle uses COW
(Copy On Write, Copy on write), therefore after page content is rewritten, it needs the content of this page writing back to its corresponding
Physical memory, so that the problem of correct data are accessed in all processes for sharing this page, this leads to EMS memory occupation.Wherein,
Memory management unit is used to manage the memory of dynamic language system, such as memory management unit includes system heap (system
Heap), which is the data structure of system administration dynamic memory distribution.Content in page includes program object, program pair
As the object (object) for referring to generating in dynamic language program operation process, such as in Javascript engine V8, journey
Scripting object, Sharing Function information object, weak reference cell object, code (code) may be generated when sort run in engine
Object etc., wherein what is stored in code object is the bytecode that program code compiling generates.
The program object of dynamic language includes the program object for being easy to rewrite, and also includes the program object for being not easy to rewrite, because
This, in the case where the program object rewritten is easy in page and is not easy the program object rewritten mixing, if being easy the program rewritten
Object is rewritten, and just will appear the problem of whole page will be written back into memory.The embodiment of the present application can divide program object
Class, wherein classification includes variable class, and program object includes the program object of variable class, and the program object of variable class refers to program
Object is rewritable, and when rewriting program object, the content of page where the program object is just changed, above-mentioned to be easy to be changed to
Program object can be the program object of variable class.
In view of the above-mentioned problems, the embodiment of the present application can concentrate on the program object of variable class in one or several pages, it is real
Now reduce the effect of EMS memory occupation.Referring to Fig.1, a kind of memory processing schematic in the embodiment of the present application is shown.
In electronic equipment can the program write of operation state language, generate program object in program operation process, the program
Program object can be obtained from object set.Program object is located in corresponding initial space when initially setting up, specific institute
The initial space at place is determined according to program operation, and the initial space of program object is not indicated in Fig. 1.In order to reduce to memory
It occupies, can determine the program object of the variable class in object set in a step 102.Then at step 104 by variable class
Program object is moved in subspace corresponding with the program object of variable class, the corresponding one or more pages in the subspace,
Content is stored in the subspace in page corresponding to sub-spaces.It is one or several to concentrate on the program object of variable class
In page, the effect for reducing EMS memory occupation is realized.
Wherein, the classification of program object includes variable class and non-variable class, and variable class includes that program object is easy to rewrite
Classification, non-variable class include that program object is not easy the classification rewritten, and the program object of variable class is alternatively referred to as mutable object, such as
The attribute of object and method, Sharing Function information object, weak reference cell object etc. in Javascript program;Non-variable class
Program object can be described as string in non-variable object, such as Javascript program in constant pool, code object.It can
Whether can be rewritten in its life cycle according to program object, carrying out determining program object is variable class or non-variable class.Such as
When engine-operated JIT optimizes, the corresponding JIT address field of Sharing Function information object can be rewritten;For another example, garbage reclamation mistake is being executed
Cheng Zhong can rewrite the front and back link field of weak reference cell object;For another example, code object would not rewrite after generation.
Therefore classification can determine that by the analysis to program object, for example, can traversal program object set, according to journey
The life cycle of ordered pair elephant analyzes described program object, and determining can be changed the program object of class and non-variable in object set
The program object of class.Wherein, whether program object is rewritten in life cycle, can be determined according to various ways, example
If whether polling routine object has been rewritten, for another example determine whether program object may be rewritten.
In one example, analysis of the program object in life cycle can be used such as under type: according to described program
Operation information, analyze rewriting number of the described program object in life cycle;Program pair of the number beyond threshold value will be rewritten
Program object as being determined as variable class;Rewriting number is determined as to the program pair of non-variable class without departing from the program object of threshold value
As.Wherein, in program operation process, program object may be rewritten, and such as be rewritten when engine-operated JIT optimizes shared
The corresponding JIT address field of function information object, therefore the operation information in recordable program operation process, then analyze the operation
Information determines whether each program object is rewritten in the life cycle of the program object, and rewrites number accordingly, so
The classification of program object is determined based on the rewriting number afterwards.Wherein, settable for distinguishing the threshold value of classification, which can be based on
Demand setting, such as threshold value are 1 or 3, to judge to rewrite program object of the number beyond threshold value for the program object of variable class;
Program object of the number without departing from the program object of threshold value for non-variable class will be rewritten.Such as setting threshold value is 0, as long as then program
It is exactly variable class that object, which is written over,.In the embodiment of the present application, the operation information of program can be obtained based on Profiling mechanism,
Profiling mechanism is a kind of information when being run by collection procedure come the dynamic analysis mechanism of search procedure behavior, is passed through
Profiling mechanism can determine rewriting number of the program object in its life cycle.
In another example, analysis of the program object in life cycle can be used such as under type: according to the journey
The composition information of ordered pair elephant analyzes rewrites status of the described program object in life cycle;It is rewritable by rewrites status
Program object is determined as the program object of variable class;It is non-rewritable program object by rewrites status, is determined as non-variable class
Program object.The program object whether can be rewritten in its life cycle by the composition analysis of program object, therefore
Rewrites status of the described program object in life cycle can be analyzed according to the composition information of program object.Wherein, for program
The case where object can be rewritten in its life cycle, it may be determined that be rewritable state, for program object in its life cycle
In the case where can not rewriting, it may be determined that be non-rewritable state.Wherein, composition is the composition of program object, which kind of specific group
At that can rewrite, which kind of composition will not be rewritten, and can be determined according to dynamic language used by reality and running environment,
The embodiment of the present application to this with no restriction.
Above provide the analysis modes of two kinds of program object classifications, wherein the analysis for the operation information of program is
The judgement of rewriting has been sent out into for program object, and for the analysis of program object composition whether may for program object
The judgement rewritten can be analyzed in actual treatment using any of the above-described kind of mode, also be carried out in combination with two ways
The operation information of program is such as first analyzed in analysis, for there is no the program objects of rewriting, then carries out the analysis etc. of its composition,
Can also be used the analysis mode of other program object classifications, the embodiment of the present application to this with no restriction.
It can be also program object addition label for the ease of carrying out the movement of program object in the embodiment of the present application,
In, changeable indicia can be added for the program object of variable class;Non-variable label can be added for the program object of non-variable class.Pass through
Changeable indicia identifies the program object of variable class, passes through the non-variable program object for identifying non-variable class.It can also create
Build corresponding subspace, including creating corresponding with the program object of variable class subspace, and creation and it is described it is non-can
Become the corresponding subspace of program object of class.Due to the quantity of unknown program object of all categories, subspace can configure
Amount of storage is dynamic change, and it not is unalterable which, which can increase according to the quantity of storage program object and be increased,
's.
Subspace is moved to for program object, the program object of the variable class can be moved to and the variable class
In the corresponding subspace of program object, the program object of the non-variable class is moved to the program object with the non-variable class
In corresponding subspace.For example, the program object with changeable indicia is moved to corresponding with the program object of the variable class
Subspace;Program object with non-variable label is moved to subspace corresponding with the program object of the non-variable class.From
And the program object with changeable indicia can be put into same page, the program object with non-variable label is put into same page
In, different types of program object can be distributed in not same page.
In the embodiment of the present application, subspace is included at least: subspace corresponding with the program object of variable class and with it is non-can
Become the corresponding subspace of program object of class, the corresponding one or more pages in the subspace, in page corresponding to sub-spaces in
It stores and is stored in the subspace.Each page of size it is certain, the program object in the same page can be continuous in subspace
Arrangement, arrangement mode of the program object of same page in subspace does not limit.
Wherein, the access information of distinct program object also has a difference, the access information include: access frequency and/or
Number is rewritten, the number of rewriting is the number that program object is rewritten, and the access frequency is what program object was accessed
Frequency, access information can be obtained based on the operation information of program, such as obtain access information based on Profiling mechanism.It can will be sub
Program object is ranked up according to access information in space, is such as sorted from high to low (or from low to high) according to access frequency, or
Person sorts etc. from low to high (or from high to low) according to number is rewritten.To generic program object can according to access information into
The high program object of access frequency, is arranged together such as in generic program object, program can be improved by row arrangement
Locality of reference improves the speed of service of program, reduces the EMS memory occupation of program.
It in the embodiment of the present application, is internally deposited and is managed using memory management unit, therefore be moved to son in program object
Behind space, subspace and memory management unit can also be linked, so that subspace is managed using memory management unit,
In, subspace corresponding with the program object of variable class and memory management unit can be linked, and by the journey with non-variable class
Ordered pair is linked as corresponding subspace and the memory management unit.Wherein, for the link of subspace and memory management unit,
The subspace can be linked to memory management unit by the data structure field of rewriting subspace.Including rewriting and variable class
The corresponding subspace of program object data structure field so that subspace corresponding with the program object of variable class and memory pipe
Unit link is managed, and rewrites the data structure field of subspace corresponding with the program object of non-variable class, so that with non-variable
The corresponding space of the program object of class and memory management unit link, specifically can be according to memory management to the rewriting of data structure field
The configuration of unit determines.
It can be applied to the implementation procedure of garbage reclamation (Garbage Collection, GC) algorithm in the embodiment of the present application
In, described program object includes enlivening object.For example, the mark subalgorithm of the label foundation garbage collection algorithms to program object
It realizes;Airlink function realization etc. of the link of the subspace and memory management unit according to the garbage collection algorithms.
In computer science, garbage reclamation is automatic memory management, the object that can not use current operation program
The Memory recycle of occupancy is to system.Garbage collection algorithms include dividing for garbage reclamation (Generational GC) algorithm, this is base
Divide a kind of tracing type garbage reclamation (TracingGarbage Collection) algorithm in generation in object.Garbage collection algorithms
Including mobile garbage reclamation (Moving GC) algorithm, be it is a kind of can in the life cycle of program object mobile process object
Garbage collection algorithms.
Wherein, dynamic language system can be by its internal garbage collection subsystem realized come management program object.In order to
Response time and the memory usage for improving dynamic language system, it is special in the difference of its life cycle for distinct program object
The space of memory management unit can be divided into multiple subspaces based on point generation by sign, garbage collection subsystem.Such as the Cenozoic, old age
In generation, can also there is other multiple subspaces etc., and different garbage collection algorithms is respectively adopted in every sub-spaces, and Lai Huishou is no longer living
The occupied space of the program object of jump.Wherein, program object is general first distributes in the Cenozoic, if by also depositing after a certain period of time
It is living, so that it may to be elevated to personated old man's generation or other subspaces;Otherwise just destroyed.Wherein, program object is only temporarily deposited in new life
In the space in generation, after a period of time, program object or destroyed or be elevated to other spaces.For personated old man generation with
And the management of other subspaces, garbage collection subsystem are generally used the mobile garbage collection algorithms such as mark-deflation, come
Recycle the no longer active occupied memory of program object.
Wherein, it is mobile enliven object to subspace when, can will enliven object and continuously arrange from the start address of subspace,
To maximumlly connect free memory space, to meet subsequent memory distribution application, avoid due to memory fragmentation mistake
The problem of influencing space distribution, the memory fragmentation are to destroy program object to generate more.But above-mentioned is only by neozoic
Space is continuously arranged when being moved to other subspaces, without considering the arrangement of program object to dynamic language program internal memory
The influence of occupancy, although above-mentioned carried out continuous arrangement, program object is not distinguished in memory management unit institute management page,
Therefore still can there are problems that committed memory.
Therefore, the embodiment of the present application can mark subalgorithm and movement garbage collection algorithms based on garbage collection algorithms
Deng, it is mobile enliven object when, according to the characteristic enlivening object and whether rewriting in life cycle, determine the work of variable class
Jump object and non-variable class enliven object, then will enliven object according to classification arrangement to the different corresponding subspaces of page
It is interior, to reduce because of the case where whole page is written back into physical memory caused by the rewriting of the program object of only a few, reduce journey
The memory usage of sequence.The above process may be incorporated in garbage collection algorithms implementation procedure and realize, thus in mobile garbage reclamation
In the process of packing of algorithm, whether program object can be rewritten as in its life cycle, be moved to corresponding subspace, in reduction
Deposit occupancy.
It therefore can be based on the mark subalgorithm of garbage collection algorithms, the object set of traversal program, to the object set
Middle program object is analyzed, wherein can operation information based on program, program object the analysis program object such as composition information
Classification, and be the corresponding label of described program object addition according to classification.Such as the object set of traversal can be the work of program
Jump object set alive_objs, and inactive object can be removed by garbage collection algorithms, so as to (deposit to enlivening object
Program object living) it is identified.Subspace mutabe_subspace corresponding with the program object of variable class can be created, with
And creation subspace immutable_subspace corresponding with the program object of non-variable class, the amount of storage of subspace are dynamics
Variation, which can expand with the immigration for enlivening object.It wherein, can be mobile by the program object with changeable indicia
To subspace mutable_subspace, the program object with non-variable label is moved to subspace immutable_
subspace。
It is then based on the function that subspace is linked in mobile garbage collection algorithms to memory management unit, rewriting is described and can
Become the data structure field of the corresponding subspace mutable_space of program object of class, and rewrites the program with non-variable class
The data structure field of the corresponding subspace immutable_space of object, it is respectively that subspace immutable_space, son is empty
Between mutable_space be linked to memory management unit.
So as to according to the characteristic whether program object is rewritten in life cycle, incite somebody to action during garbage reclamation
Object categorization arrangement is enlivened in non-Cenozoic space, is reduced since page internal program object modification bring shared drive is increased
Problem can reduce the EMS memory occupation of dynamic language program.
In the embodiment of the present application, the access situation of distinct program object is different, therefore can also be by program object in subspace
It is ranked up according to access information, such as the access information of program object can be obtained by profiling mechanism.Wherein,
Profiling mechanism can collect relevant information when program is run, and so that subsequent optimization or other modules use, be based on
Profiling mechanism provides the access information of program object, in subspace program object respectively according to access information from high to low
Or it sorts from low to high.So that journey can be improved after the access frequency height/program object of rewriting often is arranged together
The locality of reference of sequence improves the speed of service of program, reduces the EMS memory occupation of program.
It is above-mentioned using garbage collection algorithms as example, based on mark subalgorithm, the mobile garbage reclamation in garbage collection algorithms
Algorithm etc. is realized to the mark of program object in program and space movement, and managing internal memory is convenient for.It can also be virtual in actual treatment
The above process is realized using other algorithms in machine, and the embodiment of the present application is without limitation.
Referring to Fig. 2, a kind of step flow chart of internal memory processing method embodiment of the application is shown.
Step 202, the program object that can be changed class in object set is determined.
Can traversal program object set, the program object in the object set is analyzed, then according to analysis
As a result the program object of variable class is determined.
Step 204, the program object of the variable class is moved to son sky corresponding with the program object of the variable class
Between in.
The corresponding one or more pages in the subspace, the page is the unit of memory management, can be by the program pair of variable class
As being moved in subspace corresponding with the program object of the variable class, so that the program object of variable class focuses on several pages
In.
To sum up, object set can be analyzed, the program object that can be changed class in object set is determined, then by the program of variable class
Object is moved in subspace corresponding with the program object of variable class, wherein the unit using page as memory management, son are empty
Between can correspond to one or more pages so that the program object of each variable class concentrates arrangement in the corresponding page in subspace, reduce packet
The quantity of page where program object containing variable class, to reduce the occupancy to memory.
In the embodiment of the present application, the classification of program object includes variable class and non-variable class, different classes of program object
It can be moved into different subspace and manage, specific as follows:
Referring to Fig. 3, the step flow chart of the application another kind internal memory processing method embodiment is shown.
Step 302, the object set of traversal program.
Step 304, described program object is analyzed according to the life cycle of program object, determines the program of variable class
The program object of object and non-variable class.
The object set of traversal program obtains program object, each program object can be analyzed according to life cycle,
Determine classification belonging to program object.
Wherein, rewriting number of the described program object in life cycle can be analyzed according to the operation information of described program;
Number will be rewritten to be determined as can be changed the program object of class beyond the program object of threshold value;Program of the number without departing from threshold value will be rewritten
Object is determined as the program object of non-variable class.Described program object can also be analyzed according to the composition information of described program object
Rewrites status in life cycle;It is the program object that rewritable program object is determined as variable class by rewrites status;It will
Rewrites status is the program object that non-rewritable program object is determined as non-variable class.Can using any of the above-described kind of mode into
Row analysis, is also analyzed in combination with two ways.Such as the two binding analysis can be executed by sub-step as shown in Figure 4:
Sub-step 402 analyzes the rewriting in life cycle time of described program object according to the operation information of described program
Number.
Sub-step 404 judges to rewrite whether number exceeds threshold value.If so, sub-step 408 is executed, if it is not, then executing son
Step 406.
Sub-step 406 analyzes described program object changing in life cycle according to the composition information of described program object
Write state.
If rewrites status is rewritable, execution sub-step 408;If rewrites status is non-rewritable, execution sub-step 410.
Sub-step 408 is determined as the program object of variable class.
Sub-step 410 is determined as the program object of non-variable class.
To first analyze the operation information of program, it is not above the program object of threshold value for rewriting number, then carry out it
The analysis of composition obtains the program object of variable class and the program object of non-variable class.
Step 306, changeable indicia is added to can be changed the program object of class, and non-for the program object addition of non-variable class
Changeable indicia.
Step 308, create the subspace corresponding with the program object of the variable class, and creation and it is described it is non-can
Become the corresponding subspace of program object of class.
The program object that variable class is identified by changeable indicia passes through the non-variable program for identifying non-variable class
Object.Corresponding subspace can be also created, including creating subspace corresponding with the program object of the variable class, and creation
Subspace corresponding with the program object of the non-variable class.
Step 310, the program object of the variable class is moved to son sky corresponding with the program object of the variable class
Between.
Step 312, the program object of the non-variable class is moved to son corresponding with the program object of the non-variable class
In space.
So as to have the program object of changeable indicia to be put into same page, by the program object with non-variable label
It is put into same page, different types of program object can be distributed in not same page.Program object in the same page can be sub empty
Between in continuously arrange, arrangement mode of the program object of same page in subspace does not limit.
Wherein, the access information of distinct program object also has a difference, the access information include: access frequency and/or
Number is rewritten, access information can be obtained based on the operation information of program, such as obtain access information based on Profiling mechanism.It can
Program object in subspace is ranked up according to access information, is such as arranged from high to low (or from low to high) according to access frequency
Sequence, or sort from low to high (or from high to low) etc. according to number is rewritten.To which generic program object can be according to access
Information is arranged, and is arranged together the high program object of access frequency such as in generic program object, be can be improved
The locality of reference of program improves the speed of service of program, reduces the EMS memory occupation of program.
Step 314, subspace corresponding with the program object of variable class and memory management unit are linked.
Step 316, subspace corresponding with the program object of non-variable class is linked with the memory management unit.
Link for subspace and memory management unit, can be by the data structure field of rewriting subspace, by the son
Airlink is to memory management unit.Data structure field as rewritten subspace corresponding with the program object of variable class, so that
Subspace corresponding with the program object of variable class and memory management unit link, and rewrite the program object with non-variable class
The data structure field of corresponding subspace, so that space corresponding with the program object of non-variable class and memory management unit chain
It connects, specifically rewriting for data structure field can be determined according to the configuration of memory management unit.
The above process can write by various modes algorithm realization in the virtual machine of electronic equipment, to journey in a kind of example
The label of ordered pair elephant is realized according to the mark subalgorithm of garbage collection algorithms;The link of the subspace and memory management unit according to
It is realized according to the airlink function of the garbage collection algorithms.
The characteristic that whether can be can be changed according to program object in life cycle, the mark subalgorithm pair according to garbage collection algorithms
Program object is marked, and when garbage collection algorithms tighten subspace, the program object of not isolabeling is moved respectively to
In different subspaces, so as to utilize the virtual memory pipe of the garbage collection subsystem of dynamic language system and operating system
The administrative mechanism that subsystem provides is managed, the shared drive of process is improved, reduces the high EMS memory occupation problem of dynamic language program,
Improve the speed of service of dynamic language program.
It should be noted that for simple description, therefore, it is stated as a series of action groups for embodiment of the method
It closes, but those skilled in the art should understand that, the embodiment of the present application is not limited by the described action sequence, because according to
According to the embodiment of the present application, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art also should
Know, the embodiments described in the specification are all preferred embodiments, and related movement not necessarily the application is implemented
Necessary to example.
On the basis of the above embodiments, the present embodiment additionally provides a kind of memory processing unit, can be applied to be based on
In the electronic equipments such as terminal device, the server of dynamic language.
Referring to Fig. 5, show a kind of structural block diagram of memory processing device embodiment of the application, can specifically include as
Lower module:
Object analysis module 502, for determining the program object that can be changed class in object set.
Object mobile module 504, for the program object of the variable class to be moved to the program pair with the variable class
As in corresponding subspace, wherein the corresponding one or more pages in the subspace, the page is the unit of memory management.
To sum up, object set can be analyzed, the program object that can be changed class in object set is determined, then by the program of variable class
Object is moved in subspace corresponding with the program object of variable class, wherein the unit using page as memory management, son are empty
Between can correspond to one or more pages so that the program object of each variable class concentrates arrangement in the corresponding page in subspace, reduce packet
The quantity of page where program object containing variable class, to reduce the occupancy to memory.
Referring to Fig. 6, the structural block diagram of another memory processing device embodiment of the application is shown, can specifically include
Following module:
Object analysis module 502 is program object for analyzing the classification of program object in object set, and according to classification
Addition label.
Space creation module 506, for creating subspace.Wherein, space creation module 506 for create it is described with it is described
The corresponding subspace of program object of variable class, and creation subspace corresponding with the program object of the non-variable class.
Object mobile module 504, for program object to be moved in corresponding subspace.Wherein, object mobile module
504 for being moved to the program object of the variable class in subspace corresponding with the program object of the variable class;By institute
The program object for stating non-variable class is moved in subspace corresponding with the program object of the non-variable class.
Airlink module 508, subspace and memory management unit are linked, to be managed by the memory management unit
The subspace.Wherein, the airlink module 508 be used for the subspace corresponding with the program object of variable class and
The memory management unit link;By the subspace corresponding with the program object of non-variable class and the memory management unit
Link.
Wherein, the object analysis module 502, the object set for traversal program;Life Cycle according to program object
Phase analyzes described program object, determines the program object of variable class and the program object of non-variable class.
The object analysis module 502, comprising: operating analysis submodule 5022, composition analysis submodule 5024 and label
Submodule 5026.
Operating analysis submodule 5022 analyzes described program object in life for the operation information according to described program
Rewriting number in period;Number will be rewritten to be determined as can be changed the program object of class beyond the program object of threshold value;It will rewrite secondary
Number is determined as the program object of non-variable class without departing from the program object of threshold value.
Composition analysis submodule 5024, for the composition information according to described program object, analysis described program object exists
Rewrites status in life cycle;It is rewritable program object by rewrites status, is determined as the program object of variable class;It will change
Write state is non-rewritable program object, is determined as the program pair of non-variable class.
Submodule 5026 is marked, for the program object addition changeable indicia to can be changed class, and the journey for non-variable class
Ordered pair is as adding non-variable label.
Wherein, subspace includes: subspace corresponding with the program object of variable class and the program object with non-variable class
Corresponding subspace.
The subspace is linked to by the airlink module 508 for the data structure field by rewriting subspace
Memory management unit.
The object mobile module 504 is also used to the access information in the subspace according to program object to program
Object is ranked up, wherein the access information includes: access frequency and/or rewriting number.
It is above-mentioned to write by various modes algorithm realization in the virtual machine of electronic equipment, to program pair in a kind of example
The label of elephant is realized according to the mark subalgorithm of garbage collection algorithms;The link of the subspace and memory management unit is according to institute
The airlink function of stating garbage collection algorithms is realized.
Wherein, in the implementation procedure of garbage collection algorithms, described program object to include enlivening object.Such as to program pair
The label of elephant is realized according to the mark subalgorithm of garbage collection algorithms;The link of the subspace and memory management unit is according to institute
The airlink function of stating garbage collection algorithms is realized.
The characteristic that whether can be can be changed according to program object in life cycle, the mark subalgorithm pair according to garbage collection algorithms
Program object is marked, and when garbage collection algorithms tighten subspace, the program object of not isolabeling is moved respectively to
In different subspaces, so as to utilize the virtual memory pipe of the garbage collection subsystem of dynamic language system and operating system
The administrative mechanism that subsystem provides is managed, the shared drive of process is improved, reduces the high EMS memory occupation problem of dynamic language program,
Improve the speed of service of dynamic language program.
The embodiment of the present application also provides a kind of non-volatile readable storage medium, be stored in the storage medium one or
Multiple modules (programs) when the one or more module is used in terminal device, can make the terminal device execute
The instruction (instructions) of various method steps in the embodiment of the present application.
The embodiment of the present application provides one or more machine readable medias, is stored thereon with executable code, when described
Executable code is performed, so that processor executes internal memory processing method described in one or more in the embodiment of the present application.
Wherein, the electronic equipment includes the equipment such as terminal device, server (cluster).In the embodiment of the present application, what terminal device referred to
It is the equipment with terminal operating system, these equipment can support the function of audio, video, data etc., including mobile whole
End such as smart phone, tablet computer, wearable device, are also possible to the equipment such as smart television, personal computer.Operating system is such as
AliOS, IOS, Android, Windows etc..
Fig. 7 is the hardware structural diagram for the electronic equipment that one embodiment of the application provides, which may include end
The equipment such as end equipment, server (cluster).As shown in fig. 7, the electronic equipment may include input equipment 70, it is processor 71, defeated
Equipment 72, memory 73 and at least one communication bus 74 out.Communication bus 74 is for realizing the communication connection between element.It deposits
Reservoir 73 may include high-speed RAM (Random Access Memory, random access memory), it is also possible to further include non-volatile
Property storage NVM (Non-Volatile Memory), a for example, at least magnetic disk storage can store in memory 73 various
Program, for completing various processing functions and realizing the method and step of the present embodiment.
Optionally, above-mentioned processor 71 can be for example central processing unit (Central ProcessingUnit, abbreviation
CPU), application specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable
Logical device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are real
Existing, which is coupled to above-mentioned input equipment 70 and output equipment 72 by wired or wireless connection.
Optionally, above-mentioned input equipment 70 may include a variety of input equipments, such as may include user oriented user
At least one of interface, device oriented equipment interface, the programmable interface of software, camera, sensor.Optionally, the face
It can be wireline interface for carrying out data transmission between equipment and equipment to the equipment interface of equipment, can also be for setting
Standby hardware insertion interface (such as USB interface, serial ports etc.) carried out data transmission between equipment;Optionally, the user oriented
User interface for example can be user oriented control button, for receive voice input voice-input device and user
Receive the touch awareness apparatus (such as touch screen, Trackpad with touch sensing function etc.) of user's touch input;Optionally,
The programmable interface of above-mentioned software for example can be the entrance for editing or modifying program for user, such as the input pin of chip
Interface or input interface etc.;Optionally, above-mentioned transceiver can be rf chip with communication function, at base band
Manage chip and dual-mode antenna etc..The audio input device such as microphone can receive voice data.Output equipment 72 may include
The output equipments such as display, sound equipment.
In the present embodiment, the processor of the equipment includes for executing each module of memory processing unit in each electronic equipment
Function, concrete function and technical effect are referring to above-described embodiment, and details are not described herein again.
Fig. 8 is the hardware structural diagram for the electronic equipment that another embodiment of the application provides.Fig. 8 is being realized to Fig. 7
A specific embodiment in the process.As shown in figure 8, the electronic equipment of the present embodiment includes processor 81 and memory
82。
Processor 81 executes the computer program code that memory 82 is stored, and realizes Fig. 1 to Fig. 4 in above-described embodiment
Internal memory processing method.
Memory 82 is configured as storing various types of data to support the operation in electronic equipment.These data are shown
Example includes the instruction of any application or method for operating on an electronic device, such as message, picture, video etc..It deposits
Reservoir 82 may include random access memory ram, it is also possible to and it further include nonvolatile memory NVM, a for example, at least magnetic
Disk storage.
Optionally, processor 81 is arranged in processing component 80.The electronic equipment can also include: communication component 83, electricity
Source component 84, multimedia component 85, audio component 86, input/output interface 87 and/or sensor module 88.The specific institute of equipment
Component for including etc. is set according to actual demand, and the present embodiment is not construed as limiting this.
The integrated operation of the usually control equipment of processing component 80.Processing component 80 may include one or more processors 81
It executes instruction, to complete all or part of the steps of above-mentioned Fig. 1 to Fig. 4 method.In addition, processing component 80 may include one
Or multiple modules, convenient for the interaction between processing component 80 and other assemblies.For example, processing component 80 may include multimedia mould
Block, to facilitate the interaction between multimedia component 85 and processing component 80.
Power supply module 84 provides electric power for the various assemblies of equipment.Power supply module 84 may include power-supply management system, and one
A or multiple power supplys and other with for electronic equipment generate, manage, and distribute the associated component of electric power.
Multimedia component 85 includes the display screen of one output interface of offer between equipment and user.In some implementations
In example, display screen may include liquid crystal display (LCD) and touch panel (TP).If display screen includes touch panel, display
Screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings
Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action
Boundary, but also detect duration and pressure associated with the touch or slide operation.
Audio component 86 is configured as output and/or input audio signal.For example, audio component 86 includes a microphone
(MIC), when equipment is in operation mode, when such as speech recognition mode, microphone is configured as receiving external audio signal.It is connect
The audio signal of receipts can be further stored in memory 82 or send via communication component 83.In some embodiments, sound
Frequency component 86 further includes a loudspeaker, is used for output audio signal.
Input/output interface 87 provides interface, above-mentioned peripheral interface mould between processing component 80 and peripheral interface module
Block can be click wheel, button etc..These buttons may include, but are not limited to: volume button, start button and locking press button.
Sensor module 88 includes one or more sensors, for providing the status assessment of various aspects for equipment.Example
Such as, sensor module 88 can detecte the state that opens/closes of equipment, the relative positioning of component, and user contacts with equipment
Existence or non-existence.Sensor module 88 may include proximity sensor, be configured to without any physical contact
It detects the presence of nearby objects, including detection user at a distance from equipment room.In some embodiments, which goes back
It may include camera etc..
Communication component 83 is configured to facilitate the communication of wired or wireless way between electronic equipment and other electronic equipments.
Electronic equipment can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.Implement at one
It may include SIM card slot in the electronic equipment in example, which log in equipment for being inserted into SIM card
GPRS network is communicated by internet with server foundation.
From the foregoing, it will be observed that communication component 83, audio component 86 involved in Fig. 8 embodiment and input/output interface
87, sensor module 88 can be used as the implementation of the input equipment in Fig. 7 embodiment.
The embodiment of the present application provides a kind of electronic equipment, comprising: processor;And memory, it is stored thereon with executable
Code, when the executable code is performed, so that the processor is executed such as institutes one or more in the embodiment of the present application
The internal memory processing method stated.
For device embodiment, since it is basically similar to the method embodiment, related so being described relatively simple
Place illustrates referring to the part of embodiment of the method.
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are with
The difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.
It should be understood by those skilled in the art that, the embodiments of the present application may be provided as method, apparatus or calculating
Machine program product.Therefore, the embodiment of the present application can be used complete hardware embodiment, complete software embodiment or combine software and
The form of the embodiment of hardware aspect.Moreover, the embodiment of the present application can be used one or more wherein include computer can
With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code
The form of the computer program product of implementation.
The embodiment of the present application is referring to according to the method for the embodiment of the present application, terminal device (system) and computer program
The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions
In each flow and/or block and flowchart and/or the block diagram in process and/or box combination.It can provide these
Computer program instructions are set to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing terminals
Standby processor is to generate a machine, so that being held by the processor of computer or other programmable data processing terminal devices
Capable instruction generates for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram
The device of specified function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing terminal devices
In computer-readable memory operate in a specific manner, so that instruction stored in the computer readable memory generates packet
The manufacture of command device is included, which realizes in one side of one or more flows of the flowchart and/or block diagram
The function of being specified in frame or multiple boxes.
These computer program instructions can also be loaded into computer or other programmable data processing terminal devices, so that
Series of operation steps are executed on computer or other programmable terminal equipments to generate computer implemented processing, thus
The instruction executed on computer or other programmable terminal equipments is provided for realizing in one or more flows of the flowchart
And/or in one or more blocks of the block diagram specify function the step of.
Although preferred embodiments of the embodiments of the present application have been described, once a person skilled in the art knows bases
This creative concept, then additional changes and modifications can be made to these embodiments.So the following claims are intended to be interpreted as
Including preferred embodiment and all change and modification within the scope of the embodiments of the present application.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by
One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning
Covering non-exclusive inclusion, so that process, method, article or terminal device including a series of elements not only wrap
Those elements are included, but also including other elements that are not explicitly listed, or further includes for this process, method, article
Or the element that terminal device is intrinsic.In the absence of more restrictions, being wanted by what sentence "including a ..." limited
Element, it is not excluded that there is also other identical elements in process, method, article or the terminal device for including the element.
Above to a kind of internal memory processing method provided herein, a kind of memory processing unit, a kind of electronic equipment with
And a kind of machine readable media, it is described in detail, used herein principle and embodiment party of the specific case to the application
Formula is expounded, the description of the example is only used to help understand the method for the present application and its core ideas;Meanwhile it is right
In those of ordinary skill in the art, according to the thought of the application, change is had in specific embodiments and applications
Place, in conclusion the contents of this specification should not be construed as limiting the present application.