CN106371896B - Virutal machine memory configuration method and device, mobile terminal - Google Patents

Virutal machine memory configuration method and device, mobile terminal Download PDF

Info

Publication number
CN106371896B
CN106371896B CN201610838788.2A CN201610838788A CN106371896B CN 106371896 B CN106371896 B CN 106371896B CN 201610838788 A CN201610838788 A CN 201610838788A CN 106371896 B CN106371896 B CN 106371896B
Authority
CN
China
Prior art keywords
machine memory
virutal machine
default
memorymodel
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610838788.2A
Other languages
Chinese (zh)
Other versions
CN106371896A (en
Inventor
孙建华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610838788.2A priority Critical patent/CN106371896B/en
Publication of CN106371896A publication Critical patent/CN106371896A/en
Application granted granted Critical
Publication of CN106371896B publication Critical patent/CN106371896B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention provides a kind of virutal machine memory configuration method and device, mobile terminal.This method comprises: prompting user to select default memorymodel when the virutal machine memory deficiency needed for application program is run;The default memorymodel is obtained, and virutal machine memory configuration file is written into the default memorymodel;The virutal machine memory configuration file is read, and virutal machine memory is configured according to the virutal machine memory configuration file;And virutal machine memory is completed with postponing, restore the virutal machine memory configuration file.The virutal machine memory configuration method can avoid phenomena such as causing application program Caton, sudden strain of a muscle to be moved back because virutal machine memory is insufficient by modifying the maximum value of virutal machine memory.Meanwhile virutal machine memory is completed with postponing, restore virutal machine memory configuration file, when so that user being switched on next time, virtual machine is configured as default Virtual machine memory value, to avoid occupying excessive physical memory and handling other data to user makes troubles.

Description

Virutal machine memory configuration method and device, mobile terminal
Technical field
The present invention relates to technical field of mobile terminals, more particularly to a kind of virutal machine memory configuration method and device, shifting Dynamic terminal.
Background technique
The mobile terminals such as mobile phone have been increasingly becoming the necessity of people's daily life.When running of mobile terminal application program The form configuration physical memory of virtual machine, i.e. every one application program of starting one virtual machine of corresponding starting are generallyd use, by void Quasi- machine provides memory for the normal operation of application program.Traditional virutal machine memory size is fixed and invariable, i.e., can not basis Mobile terminal practical operation situation changes, and when this makes running of mobile terminal certain biggish application programs, is easy to appear card Pause, dodge phenomena such as moving back.
In order to solve this problem, the memory value of virtual machine is generally revisable form at present.When mobile terminal judges When memory needed for current virtual machine memory size is unable to satisfy certain application program of starting out, user is prompted to modify virutal machine memory Value meets to increase virutal machine memory value and starts the needs of certain application program is to memory.However, when user does not need to run When larger application program, the memory value of the virtual machine still maintains higher mode, causes to leave other use of user's operation for The physical memory of user data is smaller, makes troubles to user's normal use mobile terminal.
Summary of the invention
The present invention provides a kind of virutal machine memory configuration method and device, mobile terminal, to solve the above technical problems.
The present invention provides a kind of virutal machine memory configuration method comprising:
When the virutal machine memory deficiency needed for application program is run, user is prompted to select default memorymodel;
The default memorymodel is obtained, and virutal machine memory configuration file is written into the default memorymodel;
The virutal machine memory configuration file is read, and is configured in virtual machine according to the virutal machine memory configuration file It deposits;And
Virutal machine memory is completed with postponing, is restoring the virutal machine memory configuration file.
The present invention also provides a kind of virutal machine memory configuration devices comprising:
Prompt unit prompts user to select default memory when for the virutal machine memory deficiency needed for application program is run Mode;
Acquiring unit, for obtaining the default memorymodel;
Writing unit, for virutal machine memory configuration file to be written in the default memorymodel;
Configuration unit is read, is configured for reading the virutal machine memory configuration file, and according to the virutal machine memory File configuration virutal machine memory;And
Recovery unit restores the virutal machine memory configuration file for completing virutal machine memory with postponing.
The present invention provides a kind of mobile terminal again comprising:
It is stored with the memory of executable program code;
The processor coupled with the memory;
The processor calls the executable program code stored in the memory, executes provided by the invention It anticipates a kind of virutal machine memory configuration method.
Compared with prior art, the present invention provides a kind of virutal machine memory configuration method and device, mobile terminal.This is virtual Machine internal memory configuring method prompts user to select default memorymodel in the virutal machine memory deficiency needed for application program is run; The default memorymodel is obtained, and virutal machine memory configuration file is written into the default memorymodel;It reads described virtual Machine memory configurations file, and virutal machine memory is configured according to the virutal machine memory configuration file;And it completes in virtual machine It deposits with postponing, restores the virutal machine memory configuration file.Virutal machine memory configuration method weight in virutal machine memory deficiency It is new to carry out virutal machine memory configuration, so that the virutal machine memory reconfigured meets the service requirement of current application program, thus Avoid phenomena such as causing application program Caton, sudden strain of a muscle to be moved back because of virutal machine memory deficiency.Meanwhile matching completing virutal machine memory It postpones, restores virutal machine memory configuration file, when so that user being switched on next time, virtual machine is configured as default Virtual machine memory Value, to avoid that virtual machine occupies excessive physical memory and handling other data to user makes troubles.
Detailed description of the invention
Fig. 1 is the flow chart of the first preferred embodiment of virutal machine memory configuration method of the invention.
Fig. 2 is the flow chart of the second preferred embodiment of virutal machine memory configuration method of the invention.
Fig. 3 is the structural schematic diagram of the first preferred embodiment of virutal machine memory configuration device of the invention.
Fig. 4 is the structural schematic diagram of the second preferred embodiment of virutal machine memory configuration device of the invention.
Fig. 5 is the structural schematic diagram of mobile terminal of the invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those skilled in the art's every other implementation obtained without creative efforts Example, shall fall within the protection scope of the present invention.
Term " first ", " second " in the present invention etc. can be used to describe various elements herein, but these elements are not It is limited by these terms.These terms are only used to distinguish the first element from the other element.For example, not departing from the present invention Range in the case where, the first control can be known as the second control, and similarly, the second control can be known as the first control. First control and the second control both control, but it is not same control.In addition, term " includes " and " having " and it Any deformation, it is intended that cover and non-exclusive include.
Embodiment one
The present embodiment provides a kind of virutal machine memory configuration methods, this method comprises: virtual needed for application program operation When machine low memory, user is prompted to select default memorymodel;Obtain the default memorymodel, and by the default memory mould Virutal machine memory configuration file is written in formula;The virutal machine memory configuration file is read, and is configured according to the virutal machine memory File configuration virutal machine memory;And virutal machine memory is completed with postponing, restore the virutal machine memory configuration file.
Fig. 1 is please referred to, Fig. 1 is the flow chart of the first preferred embodiment of virutal machine memory configuration method of the invention.This The virutal machine memory configuration method that embodiment provides can be applied to personal computer, hand-held or laptop devices, mobile electricity On the electronic equipments such as words, personal digital assistant (PDA), media player, it is not particularly limited herein.
In step s101, when the virutal machine memory deficiency needed for application program is run, user is prompted to select default memory Mode.
When user needs using certain application program, memory value needed for terminal will acquire the operation application program, and judge Memory value needed for whether terminal current virtual machine maximum memory value meets the operation application program.If judging, terminal is currently empty Memory needed for quasi- machine maximum memory value is unable to satisfy the operation application program, then void needed for determining the terminal operating application program Quasi- machine low memory.
Specifically, judge terminal current virtual machine maximum memory value whether be greater than run the application program needed for memory Value.If terminal current virtual machine maximum memory value determines terminal operating no more than memory value needed for running the application program Virutal machine memory needed for application program is insufficient.Certainly, terminal judge current virtual machine maximum memory value whether meet operation this answer Method used by the memory value needed for program is not limited to above situation.
When the virutal machine memory deficiency needed for terminal judges that application program is run, terminal will send prompt information, prompt User selects default memorymodel.Wherein, default memorymodel is the virutal machine memory configuration mode being pre-stored in terminal. Terminal can preset multiple default memorymodels, and multiple default memorymodel is stored in a virutal machine memory ginseng In ordered series of numbers table.User can select any one in multiple default memorymodels according to prompt information.
In the present embodiment, virutal machine memory parameter list includes that default memorymodel one (i.e. match by default Virtual machine memory Set mode), default memorymodel two and default memorymodel three.Wherein preset virtual machine most imperial palace corresponding to memorymodel one Depositing value is 32MB, and presetting virtual machine maximum memory value corresponding to memorymodel two is 64MB, is preset corresponding to memorymodel three Virtual machine maximum memory value be 128MB.For example, current virtual machine memory configurations mode is default memorymodel one, accordingly Virtual machine maximum memory value will be arranged to 32MB.When the memory value needed for running certain game application is 50MB, the void Quasi- machine will be unable to memory needed for meeting the operation application program, needs user to replace bigger virutal machine memory value at this time, such as will Default memorymodel one switches to default memorymodel two or three.
Certainly, in other embodiments, the number of default memorymodel included in virutal machine memory parameter list is not It is limited to above three, may include more or fewer default memorymodel.In addition, each corresponding to default memorymodel The size of virtual machine maximum memory value is also not limited to above situation, can be configured according to terminal practical application, herein It is not particularly limited.
Step S102: the default memorymodel is obtained, and the default memorymodel write-in virutal machine memory is configured File.
After user has clicked any one default memorymodel according to prompt information, terminal will acquire user click it is pre- If memorymodel, and this is preset into memorymodel write-in virutal machine memory configuration file.Wherein, virutal machine memory configuration file is Read file when terminal system configures virutal machine memory.
For example, terminal system reads virutal machine memory configuration file first after user opens terminal by power button, if eventually It is empty file that end system, which reads virutal machine memory configuration file, then it is default Virtual machine that terminal system, which will default the virutal machine memory, Setting virtual machine maximum memory value is at this time 32MB by memory configurations mode, i.e., default memorymodel one.When terminal system is read It when virutal machine memory configuration file, gets after presetting memorymodel two in virutal machine memory configuration file, terminal system is by root It is 64MB according to default memorymodel two setting virtual machine maximum memory value.
Step S103: the virutal machine memory configuration file is read, and is configured according to the virutal machine memory configuration file Virutal machine memory.
After virutal machine memory configuration file is written in the default memorymodel that terminal selects user, terminal will restart System, so that being come into force by modified virutal machine memory configuration file.After terminal restarting, the virutal machine memory will be read and matched File is set, virutal machine memory is configured according to the default memorymodel in the virutal machine memory configuration file.For example, when pre- If memorymodel two is written into virutal machine memory configuration file, terminal will preset memorymodel two according to this and virtual machine is arranged Maximum memory value is 64MB.After virtual machine maximum memory value is set as 64MB, which can operate normally the application Program, to avoid causing application program Caton because virutal machine memory is inadequate, dodge phenomena such as moving back.
Step S104: virutal machine memory is completed with postponing, is restoring the virutal machine memory configuration file.
After the completion of virutal machine memory configuration, terminal restores modified virutal machine memory configuration file to default Virtual Machine memory configurations file, in the present embodiment, default Virtual machine memory configurations file are corresponding with the default memorymodel one.
After user has used the application program, it is only necessary to restart terminal, it can the memory of virtual machine is extensive Multiple extremely default memorymodel one, that is, restore to default Virtual machine memory configurations mode.Physical memory occupied by virtual machine becomes in this way Small, remaining physical memory will become larger, and store the user data such as more pictures to user and offer convenience, while improve physical memory Utilization rate.
Virutal machine memory configuration method in the present embodiment, in the virutal machine memory deficiency needed for application program is run, User is prompted to select default memorymodel;Default memorymodel is obtained, and default memorymodel write-in virutal machine memory is configured File;Virutal machine memory configuration file is read, and virutal machine memory is configured according to virutal machine memory configuration file;And it completes Virutal machine memory restores virutal machine memory configuration file with postponing.This method is in virutal machine memory deficiency by again to void Quasi- machine memory is configured to increase virtual machine maximum memory value, to avoid causing application program because of virutal machine memory deficiency Phenomena such as Caton, sudden strain of a muscle are moved back.Meanwhile virutal machine memory is completed with postponing, restore virutal machine memory configuration file, so that eventually After end is restarted, virutal machine memory size will be restored to default Virtual machine memory value, so that virtual machine be avoided to occupy excessive object Manage memory and handling other data to user makes troubles, improve the utilization rate of physical memory.
Embodiment two
The present embodiment provides a kind of virutal machine memory configuration methods, this method comprises: virtual needed for application program operation When machine low memory, inquiry prompt information is generated, and user operation instruction is obtained according to the inquiry prompt information;And according to The user operation instruction generates selection dialog box;Described in acquisition user selects in the drop-down list of the selection dialog box Default memorymodel, and virutal machine memory configuration file is written into the default memorymodel;Restart terminal system;It reads The virutal machine memory configuration file, and virutal machine memory is configured according to the virutal machine memory configuration file;And it completes Virutal machine memory empties the content of the virutal machine memory configuration file with postponing.
Referring to figure 2., Fig. 2 is the flow chart of the second preferred embodiment of virutal machine memory configuration method of the invention.This The virutal machine memory configuration method that embodiment provides can be applied to personal computer, hand-held or laptop devices, mobile electricity On the electronic equipments such as words, personal digital assistant (PDA), media player, it is not particularly limited herein.
In step s 201, when the virutal machine memory deficiency needed for application program is run, inquiry prompt information, and root are generated User operation instruction is obtained according to the inquiry prompt information;And selection dialog box is generated according to the user operation instruction.
When user needs to run certain application program, memory value needed for terminal will acquire the operation application program, and judge Memory value needed for whether terminal current virtual machine maximum memory value meets the operation application program, if judging, terminal is currently empty Memory needed for quasi- machine maximum memory value is unable to satisfy the operation application program, then void needed for determining the terminal operating application program Quasi- machine low memory.
Specifically, judge terminal current virtual machine maximum memory value whether be greater than run the application program needed for memory Value.If terminal current virtual machine maximum memory value determines terminal operating no more than memory value needed for running the application program Virutal machine memory needed for application program is insufficient.Certainly, terminal judge current virtual machine maximum memory value whether meet operation this answer Method used by the memory value needed for program is not limited to above situation.
When the virutal machine memory deficiency needed for terminal is judged to run the application program, terminal, which will generate, inquires prompt letter Breath.In the present embodiment, which needs to reconfigure virtual for prompting user's current virtual machine low memory Machine memory.In the inquiry prompt information, it is equipped with selection operation button.If user agrees to reconfigure virutal machine memory, select "Yes" is selected, terminal will acquire the user operation instruction at this time.If user, which disagrees, reconfigures virutal machine memory, select "No", terminal will move out the application program at this time, that is, terminate to run the application program.
After terminal, which gets the user, selects the operational order of "Yes", selection pair will be generated according to the user operation instruction Talk about frame.The selection dialog box includes a drop-down list.Display has multiple default memorymodels in the drop-down list.At other In embodiment, selects the mode of the default memorymodel of dialog box presentation to be not limited to the form of drop-down list, other can also be used Mode present, be not particularly limited herein.
It should be noted that default memorymodel is the virutal machine memory configuration mode being pre-stored in terminal. Terminal can preset multiple default memorymodels, and multiple default memorymodel is stored in a virutal machine memory ginseng In ordered series of numbers table.In the present embodiment, virutal machine memory parameter list includes that default memorymodel one (i.e. match by default Virtual machine memory Set mode), default memorymodel two and default memorymodel three.Wherein preset virtual machine most imperial palace corresponding to memorymodel one Depositing value is 32MB, and presetting virtual machine maximum memory value corresponding to memorymodel two is 64MB, is preset corresponding to memorymodel three Virtual machine maximum memory value be 128MB.For example, current virtual machine memory configurations mode is default memorymodel one, accordingly Virtual machine maximum memory value will be arranged to 32MB.When the memory value needed for running certain game application is 50MB, the void Quasi- machine will be unable to memory needed for meeting the operation application program, needs user to replace bigger virutal machine memory value at this time, such as will Default memorymodel one switches to default memorymodel two or three.
Certainly, in other embodiments, the number of default memorymodel included in virutal machine memory parameter list is not It is limited to above three, may include more or fewer default memorymodel.In addition, each corresponding to default memorymodel The size of virtual machine maximum memory value is also not limited to above situation, can be configured according to terminal practical application, herein It is not particularly limited.
In the present embodiment, default memorymodel one, default memory are shown in the drop-down list of the selection dialog box Mode two and default memorymodel three.If the virutal machine memory configuration mode of present terminal is default memorymodel one, the choosing Selecting the default memorymodel one in the drop-down list of dialog box is that state not may be selected, and user may only select default memorymodel Two and default memorymodel three.Certainly, in other embodiments, can also only be shown in the drop-down list of the selection dialog box pre- If memorymodel two and default memorymodel three, are not particularly limited herein.
Step S202: obtaining the default memorymodel that user selects in the drop-down list of the selection dialog box, And virutal machine memory configuration file is written into the default memorymodel.
When the user clicks after the selectable default memorymodel of any one in the drop-down list of the selection dialog box, eventually End will acquire the default memorymodel of user's click, and this is preset memorymodel write-in virutal machine memory configuration file.Wherein, Virutal machine memory configuration file is read file when terminal system configures virutal machine memory.
For example, terminal system reads virutal machine memory configuration file first after user opens terminal by power button, if eventually It is empty file that end system, which reads virutal machine memory configuration file, then it is default Virtual machine that terminal system, which will default the virutal machine memory, Setting virtual machine maximum memory value is at this time 32MB by memory configurations mode, i.e., default memorymodel one.When terminal system is read It when virutal machine memory configuration file, gets after presetting memorymodel two in virutal machine memory configuration file, terminal system is by root It is 64MB according to default memorymodel two setting virtual machine maximum memory value.
In the present embodiment, terminal obtains the default memory mould that user selects in the drop-down list of the selection dialog box Formula specifically obtains this and presets the corresponding maximum heap memory value of memorymodel.Wherein, maximum heap memory value is used to indicate virtual machine Heap memory value workable for maximum.Each default memorymodel corresponds to different maximum heap memory values.For example, default memory mould The corresponding maximum heap memory value of formula one is 32MB, and presetting the corresponding maximum heap memory value of memorymodel two is 64MB, presets memory The corresponding maximum heap memory value of mode three is 128MB.When user selects default memorymodel two, terminal will acquire and preset interior The corresponding maximum heap memory value 64MB of mode two is deposited, and virutal machine memory configuration file is written into maximum heap memory value 64MB In, so that follow-up system configures virutal machine memory according to maximum heap memory value 64MB.
Step S203: restarting terminal system.
When the corresponding maximum heap memory value write-in virutal machine memory configuration text of default memorymodel that terminal selects user After part, terminal is by restarting systems, so that being come into force by modified virutal machine memory configuration file.
Step S204: the virutal machine memory configuration file is read, and is configured according to the virutal machine memory configuration file Virutal machine memory.
After terminal restarting, the virutal machine memory configuration file will be read, that is, reads the virutal machine memory configuration file Interior maximum heap memory value, and virutal machine memory is configured according to the maximum heap memory value.For example, when default memorymodel When maximum heap memory value 64MB corresponding to two is written into virutal machine memory configuration file, terminal will be according to the maximum heap memory Value setting virtual machine maximum free memory value is 64MB.After virtual machine maximum memory value is set as 64MB, which can be with The application program is operated normally, to avoid causing application program Caton because virutal machine memory is inadequate, dodge phenomena such as moving back hair It is raw.
In step S205, virutal machine memory is completed with postponing, is emptying the content of the virutal machine memory configuration file.
After the completion of virutal machine memory configuration, terminal will empty the content of virutal machine memory configuration file, that is, delete maximum Heap memory value 64MB so that virutal machine memory configuration file becomes empty file, namely restores virutal machine memory configuration file to silent Recognize virutal machine memory configuration file.
It should be noted that the default Virtual machine memory configurations file in the present embodiment is empty file, that is, work as system It is default memorymodel one by default Virtual machine memory configurations mode when reading virutal machine memory configuration file is empty file, this When virtual machine maximum free memory value be 32MB.In other embodiments, if default Virtual machine memory configurations file is not ineffective law, rule, etc. Part, i.e., default Virtual machine memory configurations document memory has default memorymodel one at this time, then can be by will be modified virtual Default memorymodel two in machine memory configurations file is revised as default memorymodel one, Lai Huifu virutal machine memory configuration file For default Virtual machine memory configurations file, specific reset mode is not limited herein.
After user has used the application program, it is only necessary to restart terminal, it can the memory of virtual machine is extensive Maximum heap memory value 32MB corresponding to multiple extremely default memorymodel one, namely restore to default Virtual machine memorymodel.In this way, User can obtain more remaining physical memories, and the operation of the user data such as more pictures is stored convenient for user, improves physics The utilization rate of memory.
In order to more clearly from illustrate this virutal machine memory configuration method, herein with the virutal machine memory configuration method application It is described in detail mobile phone is application scenarios.
In user after downloading certain hot game application program in application treasured, when user needs to play the game, open The game application.At this point, terminal, which will judge that can current virtual machine maximum memory value meet, runs the game application Required memory.If terminal judges that current virtual machine maximum memory value is unable to satisfy the operation game application, terminal An inquiry prompt information will be generated.The inquiry prompt information prompts user, and " current virtual machine memory is smaller, if needs again Virutal machine memory is set ".
If user selects "Yes", terminal will acquire the "Yes" operational order, and generate selection pair according to the operational order Talk about frame.It is set in the drop-down list of selection dialog box there are three types of default memorymodel, i.e., default memorymodel one presets memory mould Formula two and default memorymodel three.Where it is assumed that current virtual machine memory configurations mode is default memorymodel one, i.e., it is empty at this time Quasi- machine maximum memory value is 32MB.
If user wishes to select default memorymodel two, default memorymodel two is clicked in drop-down list.Terminal will Maximum heap memory value 64MB corresponding to the default memorymodel two is obtained, and virtual machine is written into maximum heap memory value 64MB In memory configurations file, modified virutal machine memory configuration file is formed.
Terminal will restart, and in terminal booting, terminal obtains the modified virutal machine memory configuration file, according to Maximum heap memory value 64MB in the modified virutal machine memory configuration file configures virutal machine memory, at this point, empty The maximum value of quasi- machine memory will be configured as 64MB.
In order to which user can be allowed to learn, current virtual machine memory configurations state, terminal can pop up prompted dialog frame, prompt User's current virtual machine memory configurations are completed.User can put open game application, and terminal can operate normally the game journey Sequence.
When user does not need to play game, in order to obtain more physical memories, user can be by restarting come weight New setting virutal machine memory.Due to completing to virutal machine memory with postponing, terminal will restore virutal machine memory configuration text automatically Part is default Virtual machine memory configurations file.After terminal is restarted, terminal will read default Virtual machine memory configurations file, and root 32MB is set by virtual machine maximum memory value according to the default Virtual machine memory configurations file.At this point, user can obtain more Physical memory store user data.
Above-mentioned application scenarios are just for the sake of the virutal machine memory configuration method in further explanation the present embodiment, Bu Nengyong The scope of application of virutal machine memory configuration method in limitation the present embodiment.
Virutal machine memory configuration method in the present embodiment, it is raw when application program runs required virutal machine memory deficiency User operation instruction is obtained at inquiry prompt information, and according to inquiry prompt information;And it is generated and is selected according to user operation instruction Select dialog box;Obtain user's default memorymodel for selecting in the drop-down list of selection dialog box, and by default memorymodel Virutal machine memory configuration file is written;After restarting terminal system, virutal machine memory configuration file is read, and according to virtual machine Memory configurations file configuration virutal machine memory;And virutal machine memory is completed with postponing, empty virutal machine memory configuration file Content.This method re-starts virutal machine memory configuration in virutal machine memory deficiency, to avoid because of virutal machine memory not Phenomena such as causing application program Caton, sudden strain of a muscle to be moved back enough.Meanwhile virutal machine memory is completed with postponing, it empties in virtual machine The content of configuration file is deposited, so that virtual machine is configured as default Virtual machine memory value, to avoid virtual machine after terminal is restarted It occupies excessive physical memory and handling other data to user makes troubles, improves the utilization rate of physical memory.
Embodiment three
Referring to figure 3., Fig. 3 is the structural schematic diagram of the first preferred embodiment of virutal machine memory configuration device of the present invention. Virutal machine memory configuration device 300 in the present embodiment can be applied to personal computer, hand-held or laptop devices, movement On the electronic equipments such as phone, personal digital assistant (PDA), media player, it is not particularly limited herein.
Virutal machine memory configuration device 300 in the present embodiment includes prompt unit 310, acquiring unit 320, writing unit 330, configuration unit 340 and recovery unit 350 are read.Wherein, prompt unit 310 is used for the virtual machine needed for application program is run When low memory, user is prompted to select default memorymodel;Acquiring unit 320 is for obtaining the default memorymodel;Write-in Unit 330 is used to default memorymodel virutal machine memory configuration file is written;Configuration unit 340 is read for reading institute Virutal machine memory configuration file is stated, and virutal machine memory is configured according to the virutal machine memory configuration file;And recovery unit 350, for completing virutal machine memory with postponing, restore the virutal machine memory configuration file.
The virutal machine memory configuration device 300 in the present embodiment is described in detail below in conjunction with Fig. 3.
When user needs using certain application program, memory needed for the processor of terminal will acquire the operation application program Value, and judge terminal current virtual machine maximum memory value whether meet run the application program needed for memory value.If judging Memory needed for terminal current virtual machine maximum memory value is unable to satisfy the operation application program, then determine the terminal operating application Virutal machine memory needed for program is insufficient.At this point, processor will send the first signal to prompt unit 310, so that prompt unit 310 Default memorymodel is selected according to the first signal prompt user.
Wherein, default memorymodel is the virutal machine memory configuration mode being pre-stored in terminal.Terminal can be preparatory Multiple default memorymodels are set, and multiple default memorymodel is stored in a virutal machine memory parameter list.With Family can select any one in multiple default memorymodels according to the prompt information that prompt unit 310 is sent.
In the present embodiment, virutal machine memory parameter list includes that default memorymodel one (i.e. match by default Virtual machine memory Set mode), default memorymodel two and default memorymodel three.Wherein preset virtual machine most imperial palace corresponding to memorymodel one Depositing value is 32MB, and presetting virtual machine maximum memory value corresponding to memorymodel two is 64MB, is preset corresponding to memorymodel three Virtual machine maximum memory value be 128MB.For example, current virtual machine memory configurations mode is default memorymodel one, accordingly Virtual machine maximum memory value will be arranged to 32MB.When the memory value needed for running certain game application is 50MB, the void Quasi- machine will be unable to memory needed for meeting the operation application program, needs user to replace bigger virutal machine memory value at this time, such as will Default memorymodel one switches to default memorymodel two or three.
Certainly, in other embodiments, the number of default memorymodel included in virutal machine memory parameter list is not It is limited to above three, may include more or fewer default memorymodel.In addition, each corresponding to default memorymodel The size of virtual machine maximum memory value is also not limited to above situation, can be configured according to terminal practical application, herein It is not particularly limited.
After user has clicked any one default memorymodel according to the prompt information that prompt unit 310 issues, obtain Unit 320 will acquire the default memorymodel that user clicks, and the default memorymodel that will acquire is transferred to writing unit 330, so that virutal machine memory configuration file is written in default memorymodel by writing unit 330.Wherein, virutal machine memory configuration text Part is read file when terminal system configures virutal machine memory.
After virutal machine memory configuration file is written in default memorymodel by writing unit 330, terminal will restart, and make Modified virutal machine memory configuration file is obtained to be come into force.After terminal restarting, void will be read by reading configuration unit 340 Quasi- machine memory configurations file, and virutal machine memory is configured according to virutal machine memory configuration file.
Specifically, it after terminal is restarted, reads configuration unit 340 and reads virutal machine memory configuration file first, further The default memorymodel in virutal machine memory configuration file is obtained, and memorymodel is preset according to this, virutal machine memory is matched It sets.For example, reading configuration unit 340 if default memorymodel two is written in virutal machine memory configuration file writing unit 330 Memorymodel two will be preset according to this virtual machine maximum memory value is arranged is 64MB.When virtual machine maximum memory value is set as 64MB Afterwards, which can operate normally the application program, to avoid causing utility card because virutal machine memory is inadequate Pause, dodge phenomena such as moving back.
When reading configuration unit 340 complete that second signal will be sent to recovery unit 350 with postponing to virutal machine memory, So that recovery unit 350 restores the virutal machine memory configuration file according to second signal, i.e. recovery unit 350 will be modified Virutal machine memory configuration file restores to default Virtual machine memory configurations file, and in the present embodiment, default Virtual machine memory is matched It is corresponding with the default memorymodel one to set file.
After user has used the application program, it is only necessary to restart terminal, it can the memory of virtual machine is extensive Multiple extremely default memorymodel one, that is, restore to default Virtual machine memory configurations mode.Physical memory occupied by virtual machine becomes in this way Small, remaining physical memory will become larger, and store the user data such as more pictures to user and offer convenience, while improve physical memory Utilization rate.
Virutal machine memory configuration device 300 in the present embodiment is insufficient in the virutal machine memory needed for application program is run When, prompt unit 310 prompts user to select default memorymodel;Acquiring unit 320 obtains default memorymodel, writing unit Virutal machine memory configuration file is written in default memorymodel by 330;It reads configuration unit 340 and reads virutal machine memory configuration text Part, and virutal machine memory is configured according to virutal machine memory configuration file;Match in completion virutal machine memory and postpones, recovery unit 350 Restore virutal machine memory configuration file.The device in virutal machine memory deficiency by again to virutal machine memory configured come Increase virtual machine maximum memory value, to avoid phenomena such as causing application program Caton, sudden strain of a muscle to be moved back because of virutal machine memory deficiency hair It is raw.Meanwhile virutal machine memory is completed with postponing, recovery unit 350 restores virutal machine memory configuration file, so that terminal is restarted Afterwards, virtual machine is configured as default Virtual machine memory value, thus avoid virtual machine from occupying excessive physical memory and to user at Managing other data makes troubles, and improves the utilization rate of physical memory.
Example IV
Referring to figure 4., Fig. 4 is the structural schematic diagram of the second preferred embodiment of virutal machine memory configuration device of the present invention. Virutal machine memory configuration device 400 in the present embodiment can be applied to personal computer, hand-held or laptop devices, movement On the electronic equipments such as phone, personal digital assistant (PDA), media player, it is not particularly limited herein.
Virutal machine memory configuration device 400 in the present embodiment includes prompt unit 410, acquiring unit 420, writing unit 430, restart unit 440, read configuration unit 450 and recovery unit 460, wherein the prompt unit 410 includes the first generation Subelement 411 obtains subelement 412 and the second generation subelement 413.
When user needs to run some application program, memory needed for the processor of terminal will acquire the operation application program Value, and judge terminal current virtual machine maximum memory value whether meet run the application program needed for memory value, if judging Memory needed for terminal current virtual machine maximum memory value is unable to satisfy the operation application program, then determine the terminal operating application Virutal machine memory needed for program is insufficient.
At this point, processor, which will generate subelement 411 to first, sends third signal, so that first generates 411, subelement Inquiry prompt information is generated according to the third signal, in the present embodiment, the inquiry prompt information is for prompting user's current virtual Machine low memory needs to reconfigure virutal machine memory.In the inquiry prompt information, it is equipped with selection operation button, if user Agreement reconfigures virutal machine memory, then selects "Yes", and obtaining subelement 412 at this time will acquire the user operation instruction.The Two, which generate subelement 413, generates selection dialog box according to the user operation instruction.
Specifically, after acquisition subelement 412, which gets the user, selects the operational order of "Yes", subelement 412 is obtained Fourth signal will be generated, so that second generates subelement 413 according to fourth signal generation selection dialog box.The selection dialog box packet Include a drop-down list.Display has multiple default memorymodels in the drop-down list.In other embodiments, dialog box is selected The mode that default memorymodel is presented is not limited to the form of drop-down list, can also be presented using other modes, not done herein Concrete restriction.
It should be noted that default memorymodel is the virutal machine memory configuration mode being pre-stored in terminal. Terminal can preset multiple default memorymodels, and multiple default memorymodel is stored in a virutal machine memory ginseng In ordered series of numbers table.In the present embodiment, virutal machine memory parameter list includes that default memorymodel one (i.e. match by default Virtual machine memory Set mode), default memorymodel two and default memorymodel three.Wherein preset virtual machine most imperial palace corresponding to memorymodel one Depositing value is 32MB, and presetting virtual machine maximum memory value corresponding to memorymodel two is 64MB, is preset corresponding to memorymodel three Virtual machine maximum memory value be 128MB.Certainly, in other embodiments, included pre- in virutal machine memory parameter list It may include more or fewer default memorymodel if the number of memorymodel is not limited to above three.In addition, each pre- If the size of virtual machine maximum memory value corresponding to memorymodel is also not limited to above situation, can be answered according to terminal is practical For being configured, it is not particularly limited herein.
In the present embodiment, default memorymodel one, default memory are shown in the drop-down list of the selection dialog box Mode two and default memorymodel three.If the virutal machine memory configuration mode of present terminal is default memorymodel one, the choosing Selecting the default memorymodel one in the drop-down list of dialog box is that state not may be selected, and user may only select default memorymodel Two and default memorymodel three.Certainly, in other embodiments, can also only be shown in the drop-down list of the selection dialog box pre- If memorymodel two and default memorymodel three, are not particularly limited herein.
When the user clicks after the selectable default memorymodel of any one in the drop-down list of the selection dialog box, obtain It takes unit 420 to will acquire the default memorymodel of user's click, and this is preset into memorymodel and passes to writing unit 430.It writes Enter unit 430 and virutal machine memory configuration file is written into default memorymodel.Wherein, virutal machine memory configuration file is terminal system System read file when being configured to virutal machine memory.
In the present embodiment, the acquisition user of acquiring unit 420 selects pre- in the drop-down list of the selection dialog box If memorymodel, specifically obtains this and preset the corresponding maximum heap memory value of memorymodel.Wherein, maximum heap memory value is used to table Show heap memory value workable for virtual machine maximum.Each default memorymodel corresponds to different maximum heap memory values.For example, pre- If the corresponding maximum heap memory value of memorymodel one is 32MB, presetting the corresponding maximum heap memory value of memorymodel two is 64MB, The corresponding maximum heap memory value of default memorymodel three is 128MB.When user selects default memorymodel two, acquiring unit 420 will acquire maximum heap memory value 64MB corresponding with default memorymodel two, and maximum heap memory value 64MB is transmitted To writing unit 430, maximum heap memory value 64MB is written in virutal machine memory configuration file by writing unit 430.
When virutal machine memory is written in the corresponding maximum heap memory value of default memorymodel that writing unit 430 selects user After configuration file, writing unit 430 will send the 5th signal to unit 440 is restarted, so that restarting unit 440 according to the 5th letter Number restarting terminal system so that being come into force by modified virutal machine memory configuration file.
After terminal system restarting, the virutal machine memory configuration file will be read by reading configuration unit 450, that is, reading should Maximum heap memory value in virutal machine memory configuration file, and virutal machine memory is configured according to the maximum heap memory value. For example, when writing unit 430 configures the write-in virutal machine memory of maximum heap memory value 64MB corresponding to default memorymodel two After in file, it is 64MB that virtual machine maximum free memory value, which will be arranged, in terminal according to the maximum heap memory value.When virtual machine maximum After memory value is set as 64MB, which can operate normally the application program, to avoid because virutal machine memory is inadequate And phenomena such as causing application program Caton, sudden strain of a muscle to be moved back.
It completes to virutal machine memory when reading configuration unit 450 with postponing, reading configuration unit 450 will be to recovery unit 460 send the 6th signal, so that recovery unit 460 empties the content of virutal machine memory configuration file according to the 6th signal, i.e., Maximum heap memory value 64MB is deleted, so that virutal machine memory configuration file becomes empty file, to restore virutal machine memory configuration File is to default Virtual machine memory configurations file.It is understood that the default Virtual machine memory configurations file in the present embodiment For empty file.
After user has used the application program, it is only necessary to restart terminal, it can the memory of virtual machine is extensive Maximum heap memory value 32MB corresponding to multiple extremely default memorymodel one, that is, restore to default Virtual machine memorymodel.In this way, with Family can obtain more remaining physical memories, and the operation of the user data such as more pictures is stored convenient for user, is improved in physics The utilization rate deposited.
Virutal machine memory configuration device 400 in the present embodiment is insufficient in the virutal machine memory needed for application program is run When, prompt unit 410 prompts user to select default memorymodel;Acquiring unit 420 obtains the default corresponding maximum of memorymodel Virutal machine memory configuration file is written in the maximum heap memory value by heap memory value, writing unit 430;Restart unit 440 and restarts end Behind end, reads configuration unit 450 and read virutal machine memory configuration file, and virtual machine is configured according to virutal machine memory configuration file Memory;Virutal machine memory is completed with postponing, recovery unit 460 will empty the content of virutal machine memory configuration file.The device Increase virtual machine maximum memory value by being configured again to virutal machine memory in virutal machine memory deficiency, to avoid Phenomena such as causing application program Caton, sudden strain of a muscle to be moved back because of virutal machine memory deficiency.Meanwhile completing virutal machine memory configuration Afterwards, recovery unit 460 restores virutal machine memory configuration file, so that virtual machine is configured as default Virtual machine after terminal is restarted Memory value improves physics to avoid that virtual machine occupies excessive physical memory and handling other data to user makes troubles The utilization rate of memory.
Embodiment five
The present invention also provides a kind of mobile terminals, such as tablet computer, mobile phone mobile terminal, referring to Fig. 5, Fig. 5 is this The mobile terminal structure schematic diagram that inventive embodiments provide.The mobile terminal 500 may include radio frequency (RF, Radio Frequency) circuit 501, include one or more memory 502, the input unit of computer readable storage medium 503, display unit 504, sensor 505, voicefrequency circuit 506, Wireless Fidelity (WiFi, Wireless Fidelity) module 507, the components such as processor 508 and the power supply 509 of processing core are included one or more than one.Those skilled in the art Member is appreciated that mobile terminal structure shown in Fig. 5 does not constitute the restriction to mobile terminal, may include more than illustrating Or less component, perhaps combine certain components or different component layouts.
Radio circuit 501 can be used for receiving and sending messages or communication process in signal send and receive, particularly, by base station Downlink information receive after, transfer to one or more than one processor 508 processing;In addition, the data for being related to uplink are sent To base station.In general, radio circuit 501 includes but is not limited to antenna, at least one amplifier, tuner, one or more oscillations Device, subscriber identity module (SIM, Subscriber Identity Module) card, transceiver, coupler, low noise amplification Device (LNA, Low Noise Amplifier), duplexer etc..In addition, radio circuit 501 can also by wireless communication with network It is communicated with other equipment.Any communication standard or agreement, including but not limited to global system for mobile telecommunications can be used in the wireless communication System (GSM, Global System of Mobile communication), general packet radio service (GPRS, General Packet Radio Service), CDMA (CDMA, Code Division Multiple Access), wideband code division it is more Location (WCDMA, Wideband Code Division Multiple Access), long term evolution (LTE, Long Term Evolution), Email, short message service (SMS, Short Messaging Service) etc..
Memory 502 can be used for storing application program and data.It include that can hold in the application program that memory 502 stores Line code.Application program can form various functional modules.Processor 508 is stored in the application journey of memory 502 by operation Sequence, thereby executing various function application and data processing.Memory 502 can mainly include storing program area and storing data Area, wherein storing program area can application program needed for storage program area, at least one function (such as sound-playing function, Image player function etc.) etc.;Storage data area, which can be stored, uses created data (such as audio number according to mobile terminal According to, phone directory etc.) etc..In addition, memory 502 may include high-speed random access memory, it can also include non-volatile deposit Reservoir, for example, at least a disk memory, flush memory device or other volatile solid-state parts.Correspondingly, memory 502 can also include Memory Controller, to provide the access of processor 508 and input unit 503 to memory 502.
Input unit 503 can be used for receiving number, character information or the user's characteristic information (such as fingerprint) of input, and Generate keyboard related with user setting and function control, mouse, operating stick, optics or trackball signal input.Specifically Ground, in a specific embodiment, input unit 503 may include touch sensitive surface and other input equipments.Touch sensitive surface, Referred to as touch display screen or Trackpad, collect user on it or nearby touch operation (such as user using finger, touching The operations of any suitable object or attachment on touch sensitive surface or near touch sensitive surface such as pen), and according to preset Formula drives corresponding attachment device.Optionally, touch sensitive surface may include both touch detecting apparatus and touch controller. Wherein, the touch orientation of touch detecting apparatus detection user, and touch operation bring signal is detected, transmit a signal to touch Controller;Touch controller receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives processing Device 508, and order that processor 508 is sent can be received and executed.Furthermore, it is possible to using resistance-type, condenser type, infrared ray And the multiple types such as surface acoustic wave realize touch sensitive surface.In addition to touch sensitive surface, input unit 503 can also include other inputs Equipment.Specifically, other input equipments can include but is not limited to physical keyboard, function key (such as volume control button, switch Key etc.), fingerprint recognition mould group, trace ball, mouse, one of operating stick etc. or a variety of.
Display unit 504 can be used for showing information input by user or the information and mobile terminal that are supplied to user Various graphical user interface, these graphical user interface can be made of figure, text, icon, video and any combination thereof. Display unit 504 may include display panel.Optionally, liquid crystal display (LCD, Liquid Crystal can be used Display), the forms such as Organic Light Emitting Diode (OLED, Organic Light-Emitting Diode) configure display surface Plate.Further, touch sensitive surface can cover display panel, after touch sensitive surface detects touch operation on it or nearby, Processor 508 is sent to determine the type of touch event, is followed by subsequent processing device 508 according to the type of touch event in display panel It is upper that corresponding visual output is provided.Although touch sensitive surface and display panel are realized as two independent components in Fig. 5 Output and input function, but in some embodiments it is possible to it is touch sensitive surface is integrated with display panel and realize input and defeated Function out.
Mobile terminal may also include at least one sensor 505, such as optical sensor, motion sensor and other sensings Device.Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel, and proximity sensor can close display surface when mobile terminal is moved in one's ear Plate and/or backlight.As a kind of motion sensor, gravity accelerometer can detect in all directions (generally three axis) The size of acceleration can detect that size and the direction of gravity when static, the application that can be used to identify mobile phone posture is (such as vertical and horizontal Shield switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.;As for movement The other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor that terminal can also configure, it is no longer superfluous herein It states.
Voicefrequency circuit 506 can provide the audio interface between user and mobile terminal by loudspeaker, microphone.Audio-frequency electric The audio data received can be converted into electric signal by road 506, be transferred to loudspeaker, and it is defeated to be converted to voice signal by loudspeaker Out;On the other hand, the voice signal of collection is converted to electric signal by microphone, is converted to audio after being received by voicefrequency circuit 506 Data, then by after the processing of audio data output processor 508, such as another mobile terminal is sent to through radio circuit 501, or Person exports audio data to memory 502 to be further processed.Voicefrequency circuit 506 is also possible that earphone jack, to mention For the communication of peripheral hardware earphone and mobile terminal.
Wireless Fidelity (WiFi) belongs to short range wireless transmission technology, and mobile terminal can be with by wireless fidelity module 507 Help user to send and receive e-mail, browse webpage and access streaming video etc., it provides wireless broadband internet for user Access.Although Fig. 5 shows wireless fidelity module 507, but it is understood that, and it is not belonging to the necessary structure of mobile terminal At can according to need within the scope of not changing the essence of the invention and omit completely.
Processor 508 is the control centre of mobile terminal, utilizes each of various interfaces and the entire mobile terminal of connection A part by running or execute the application program being stored in memory 502, and is called and is stored in memory 502 Data execute the various functions and processing data of mobile terminal, to carry out integral monitoring to mobile terminal.Optionally, it handles Device 508 may include one or more processing cores;Preferably, processor 508 can integrate application processor and modulation /demodulation processing Device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is mainly located Reason wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 508.
Mobile terminal further includes the power supply 509 (such as battery) powered to all parts.Preferably, power supply can pass through electricity Management system and processor 508 are logically contiguous, to realize management charging, electric discharge and power consumption by power-supply management system The functions such as management.Power supply 509 can also include one or more direct current or AC power source, recharging system, power supply event Hinder the random components such as detection circuit, power adapter or inverter, power supply status indicator.
Although being not shown in Fig. 5, mobile terminal can also include camera, bluetooth module etc., and details are not described herein.
Specifically in the present embodiment, processor 508 in mobile terminal can according to following instruction, by one or one with On the corresponding executable code of process of application program be loaded into memory 502, and be stored in by processor 508 to run Application program in memory 502, to realize various functions:
When the virutal machine memory deficiency needed for application program is run, user is prompted to select default memorymodel;Described in acquisition Default memorymodel, and virutal machine memory configuration file is written into the default memorymodel;The virutal machine memory is read to match File is set, and virutal machine memory is configured according to the virutal machine memory configuration file;And match in completion virutal machine memory and postpone, Restore the virutal machine memory configuration file.
In a certain embodiment, processor 508 is also used to realize following functions: in the virtual machine needed for application program is run When depositing deficiency, inquiry prompt information is generated, and user operation instruction is obtained according to the inquiry prompt information;And according to described User operation instruction generates selection dialog box.
Processor 508 will acquire the default memory mould that user selects in the drop-down list of the selection dialog box Formula.Specifically, the corresponding maximum heap memory value of default memorymodel is obtained.Processor 508 maximum heap memory value is written virtual Machine memory configurations file.Wherein, maximum heap memory value is used to indicate heap memory value workable for virtual machine maximum.It is each default interior The mode of depositing corresponds to different maximum heap memory values.
Before processor 508 reads virutal machine memory configuration file, processor 508 will restart terminal system, make Modified virutal machine memory configuration file is obtained to come into force.
In a certain embodiment, it is to empty the virtual machine that processor 508, which restores virutal machine memory configuration file concrete mode, The content of memory configurations file.
The processor 508 of the present embodiment executes virutal machine memory configuration method provided by the invention, before specification Virutal machine memory configuration method is had been described in detail, in order to illustrate the terseness of book, details are not described herein.
Mobile terminal in the present embodiment, since it applies virutal machine memory configuration method provided by the invention, so that The mobile terminal can run required memory size according to application program virutal machine memory is arranged, and avoid because of virutal machine memory not Phenomena such as causing application program Caton, sudden strain of a muscle to be moved back enough.Meanwhile virutal machine memory is completed with postponing, restore in virtual machine Configuration file is deposited, so that user is by restarting mobile terminal, it can restore to default Virtual machine memory to match by virutal machine memory Mode is set, to avoid that virtual machine occupies excessive physical memory and handling other data to user makes troubles, improves physics The utilization rate of memory.
Each functional unit in the embodiment of the present invention can integrate in a processing module, be also possible to each unit list It is solely physically present, can also be integrated in two or more units in a module.Above-mentioned integrated module can both use Formal implementation of hardware can also be realized in the form of software function module.If the integrated module is with software function The form of module is realized and when sold or used as an independent product, also can store in computer-readable storage Jie In matter.Storage medium mentioned above can be read-only memory, disk or CD etc..Above-mentioned each device or system, can be with Execute the method in correlation method embodiment.
In conclusion although the present invention has been disclosed above in the preferred embodiment, but above preferred embodiment is not to limit The system present invention, those skilled in the art can make various changes and profit without departing from the spirit and scope of the present invention Decorations, therefore protection scope of the present invention subjects to the scope of the claims.

Claims (9)

1. a kind of virutal machine memory configuration method characterized by comprising
When the virutal machine memory deficiency needed for application program is run, user is prompted to select default memorymodel, the default memory Mode is the virutal machine memory configuration mode being pre-stored in terminal;
The default memorymodel is obtained, and virutal machine memory configuration file is written into the default memorymodel;
The virutal machine memory configuration file is read, and virutal machine memory is configured according to the virutal machine memory configuration file;With And
Virutal machine memory is completed with postponing, is emptying the content of the virutal machine memory configuration file.
2. virutal machine memory configuration method according to claim 1, which is characterized in that in the prompt user selection is default Deposit mode, comprising: generate inquiry prompt information, and user operation instruction is obtained according to the inquiry prompt information;And according to The user operation instruction generates selection dialog box;
The institute that is described to obtain the default memorymodel, being selected in the drop-down list of the selection dialog box including obtaining user State default memorymodel.
3. virutal machine memory configuration method according to claim 2, described to obtain the default memorymodel, comprising: to obtain Take the corresponding maximum heap memory value of the default memorymodel;
It is described that virutal machine memory configuration file is written into the default memorymodel, comprising: the maximum heap memory value is written Virutal machine memory configuration file.
4. virutal machine memory configuration method according to claim 1, which is characterized in that read in the virtual machine described Before depositing configuration file, further includes: restarting terminal system.
5. a kind of virutal machine memory configuration device characterized by comprising
Prompt unit prompts user to select default memorymodel when for the virutal machine memory deficiency needed for application program is run;
Acquiring unit, for obtaining the default memorymodel;
Writing unit, for virutal machine memory configuration file to be written in the default memorymodel;
Configuration unit is read, for reading the virutal machine memory configuration file, and according to the virutal machine memory configuration file Configure virutal machine memory;And
Recovery unit restores the virutal machine memory configuration file for completing virutal machine memory with postponing;
The recovery unit is specifically used for emptying the content of the virutal machine memory configuration file.
6. virutal machine memory configuration device according to claim 5, which is characterized in that the prompt unit includes first raw At subelement, obtain subelement and the second generation subelement;Wherein, described first subelement is generated for generating inquiry prompt letter Breath;The acquisition subelement is used to obtain user operation instruction according to the inquiry prompt information;Described second generates subelement For generating selection dialog box according to the user operation instruction;
The acquiring unit is used to obtain the default memory mould that user selects in the drop-down list of the selection dialog box Formula.
7. virutal machine memory configuration device according to claim 5, which is characterized in that the acquiring unit is specifically used for obtaining Take the corresponding maximum heap memory value of the default memorymodel;
Said write unit is specifically used for maximum heap memory value virutal machine memory configuration file is written.
8. a kind of mobile terminal characterized by comprising
It is stored with the memory of executable program code;
The processor coupled with the memory;
The processor calls the executable program code stored in the memory, executes such as claim 1 to right It is required that 4 described in any item methods.
9. a kind of storage medium, is stored with computer program, which is characterized in that when the computer program is executed by processor Realize the method as described in claim 1.
CN201610838788.2A 2016-09-20 2016-09-20 Virutal machine memory configuration method and device, mobile terminal Active CN106371896B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610838788.2A CN106371896B (en) 2016-09-20 2016-09-20 Virutal machine memory configuration method and device, mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610838788.2A CN106371896B (en) 2016-09-20 2016-09-20 Virutal machine memory configuration method and device, mobile terminal

Publications (2)

Publication Number Publication Date
CN106371896A CN106371896A (en) 2017-02-01
CN106371896B true CN106371896B (en) 2019-08-23

Family

ID=57897893

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610838788.2A Active CN106371896B (en) 2016-09-20 2016-09-20 Virutal machine memory configuration method and device, mobile terminal

Country Status (1)

Country Link
CN (1) CN106371896B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984270B (en) * 2018-07-18 2020-12-01 苏州浪潮智能科技有限公司 Memory allocation method and device for virtual machine
CN108958891B (en) * 2018-07-26 2022-02-18 郑州云海信息技术有限公司 Virtual machine memory allocation method, device and terminal
CN109697090B (en) * 2018-12-27 2022-10-11 Oppo广东移动通信有限公司 Method for controlling terminal equipment, terminal equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101937398A (en) * 2010-09-14 2011-01-05 中兴通讯股份有限公司 Configuration method and device for built-in system memory pool
CN103092677A (en) * 2013-01-10 2013-05-08 华中科技大学 Internal storage energy-saving system and method suitable for virtualization platform
CN103197973A (en) * 2012-01-05 2013-07-10 中兴通讯股份有限公司 Mobile terminal and management method thereof
CN104331337A (en) * 2014-11-25 2015-02-04 宇龙计算机通信科技(深圳)有限公司 System memory management method, system memory management device and terminal
CN105512091A (en) * 2015-12-03 2016-04-20 青岛海信移动通信技术股份有限公司 Memory allocation method and device
CN105740078A (en) * 2016-01-29 2016-07-06 华为技术有限公司 Memory management method and apparatus, and terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101937398A (en) * 2010-09-14 2011-01-05 中兴通讯股份有限公司 Configuration method and device for built-in system memory pool
CN103197973A (en) * 2012-01-05 2013-07-10 中兴通讯股份有限公司 Mobile terminal and management method thereof
CN103092677A (en) * 2013-01-10 2013-05-08 华中科技大学 Internal storage energy-saving system and method suitable for virtualization platform
CN104331337A (en) * 2014-11-25 2015-02-04 宇龙计算机通信科技(深圳)有限公司 System memory management method, system memory management device and terminal
CN105512091A (en) * 2015-12-03 2016-04-20 青岛海信移动通信技术股份有限公司 Memory allocation method and device
CN105740078A (en) * 2016-01-29 2016-07-06 华为技术有限公司 Memory management method and apparatus, and terminal

Also Published As

Publication number Publication date
CN106371896A (en) 2017-02-01

Similar Documents

Publication Publication Date Title
US10917515B2 (en) Method for switching applications in split screen mode, computer device and computer-readable storage medium
CN106873854B (en) Terminal and interface interaction control method, and contact object creation method and device
CN104636047B (en) The method, apparatus and touch screen terminal operated to the object in list
CN103279288B (en) Data transmission method, device and terminal unit
US10775979B2 (en) Buddy list presentation control method and system, and computer storage medium
CN104978176B (en) Application programming interfaces call method, device and computer readable storage medium
CN106484562B (en) A kind of data transmission processing method and terminal device
US20150269164A1 (en) Electronic device and contact display method therefor
CN109154946A (en) A kind of method and terminal of display collection object
CN107092520A (en) Recommendation method, device, storage medium and the mobile terminal of application program
CN106484326B (en) A kind of data transmission processing method and mobile terminal
WO2016197337A1 (en) Short message processing method and apparatus, and electronic device
CN108549519A (en) split screen processing method, device, storage medium and electronic equipment
CN106658354B (en) A kind of data transmission method and equipment
CN106203228A (en) Two-dimensional code information transmission method, device and equipment
CN108958583A (en) A kind of method for sorting and terminal device of icon
CN108958606A (en) Multi-screen display method, device, storage medium and electronic equipment
CN108932094A (en) Split screen application switching method, device, storage medium and electronic equipment
WO2016127286A1 (en) Call forwarding method, terminal and portable electronic device
CN105739839B (en) The selection method and device of multimedia menu item
CN109669662A (en) A kind of pronunciation inputting method, device, storage medium and mobile terminal
CN110225180A (en) A kind of content input method and terminal device
CN104516624A (en) Method and device for inputting account information
CN104104656A (en) Account retrieving method and device
CN106371896B (en) Virutal machine memory configuration method and device, mobile terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant