CN107168887A - A kind of JavaScript object storage, recovery method and device - Google Patents

A kind of JavaScript object storage, recovery method and device Download PDF

Info

Publication number
CN107168887A
CN107168887A CN201710322364.5A CN201710322364A CN107168887A CN 107168887 A CN107168887 A CN 107168887A CN 201710322364 A CN201710322364 A CN 201710322364A CN 107168887 A CN107168887 A CN 107168887A
Authority
CN
China
Prior art keywords
javascript
size
address information
memory
heap 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.)
Granted
Application number
CN201710322364.5A
Other languages
Chinese (zh)
Other versions
CN107168887B (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.)
Shenzhen Ipanel TV Inc
Original Assignee
Shenzhen Ipanel TV Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Ipanel TV Inc filed Critical Shenzhen Ipanel TV Inc
Priority to CN201710322364.5A priority Critical patent/CN107168887B/en
Publication of CN107168887A publication Critical patent/CN107168887A/en
Application granted granted Critical
Publication of CN107168887B publication Critical patent/CN107168887B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory
    • 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/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45529Embedded in an application, e.g. JavaScript in a Web browser

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)
  • Devices For Executing Special Programs (AREA)

Abstract

The embodiment of the present application provides a kind of JavaScript object storage, recovery method and device, by the way that the JavaScript object of determination is stored to target storage position (being different from the special internal memories of JavaScript), the address information for indicating target storage position is obtained;Determine that the mode of first object heap memory and storage address information realizes the storage to JavaScript object from the special internal memories of JavaScript, JavaScript object that JavaScript engine produces in the process of running is reduced to the occupancy of the special internal memories of JavaScript, universal memory is saved, improves the operational efficiency of digital TV middleware.Accordingly, by providing the JavaScript object recovery method for JavaScript object storage method, the recovery to the special internal memories of JavaScript is realized.

Description

A kind of JavaScript object storage, recovery method and device
Technical field
The present invention relates to memory management technology field, more particularly to a kind of JavaScript object storage, recovery method And device.
Background technology
Digital TV middleware is operate in a kind of software on set top box or DTV, the master of digital TV middleware Function is wanted to include Web applications presentation, television programme reception and descrambling, local program broadcasting etc..The client of web services is clear Program (browser) of looking at can send various requests to Web server, and hypertext information to being sent from server and various Multimedia data format is explained, shows and played, and it is the main modular of digital TV middleware.
(each things in JavaScript can be regarded as a kind of literal translation formula scripts of JavaScript JavaScript object), its interpreter is referred to as JavaScript engine, and (JavaScript engine is a special disposal The virtual machine of JavaScript scripts, can typically be attached among browser), it is a part for browser, is widely used in client The script at end.Prior art is typically to divide the special internal memories of JavaScript from the universal memory of digital TV middleware Go out, to be only used for the Memory Allocation of JavaScript engine in the process of running, realize to JavaScript engine in processing The storage of the JavaScript object produced in JavaScript scenario process.
However, it has been investigated that, distributing the special internal memories of larger JavaScript from universal memory to be only used for In the case of the Memory Allocation of JavaScript engine in the process of running, often make it that universal memory remaining space is smaller, And then cause the problem of digital TV middleware operation has some setbacks.
The content of the invention
In view of this, the embodiment of the present invention provides a kind of JavaScript object storage, recovery method and device, to realize Universal memory is saved, the purpose of the operational efficiency of digital TV middleware is improved.
To achieve these goals, technical scheme provided in an embodiment of the present invention is as follows:
A kind of JavaScript object storage method, including:
Determine the JavaScript object that JavaScript engine is produced during JavaScript scripts are handled;
The JavaScript object is stored to target storage position, and obtained for indicating the target storage position Address information, the target storage position be different from the special internal memories of JavaScript;
The first object heap memory for storing the address information, institute are determined from the special internal memories of the JavaScript The remaining space for stating first object heap memory is more than the size of the address information;
The address information is stored to the first object heap memory.
It is preferred that, the first mesh for storing the address information is determined in the special internal memory from the JavaScript Heap memory is marked, including:
Determine the size with the presence or absence of remaining space not less than the address information in the special internal memories of the JavaScript Heap memory;
If it is determined that there is remaining space in the special internal memories of JavaScript not less than the size of the address information Heap memory, determines first object heap memory, the residue of the first object heap memory from the special internal memories of the JavaScript Space is not less than the size of the address information;
If it is determined that remaining space is not present in the special internal memories of JavaScript is more than or equal to the big of the address information Small heap memory, the size and the size of default heap memory of relatively more described address information;
It is described from universal memory when the size of the address information is not more than the size of default heap memory JavaScript one heap memory of special Memory Allocation, the size of the heap memory distributed and the size of the default heap memory It is identical;
It is described from universal memory when the size of the address information is more than the size of default heap memory JavaScript one heap memory of special Memory Allocation, the size of the heap memory distributed meets the storage need of the address information Ask.
It is preferred that, it is determined that believing in the special internal memories of the JavaScript with the presence or absence of remaining space not less than the address Before the heap memory of the size of breath, this method also includes:
Determine to whether there is heap memory in the special internal memories of the JavaScript;
If it is determined that heap memory is not present in the special internal memories of JavaScript, relatively the size of the address information with it is pre- If heap memory size;
It is described from universal memory when the size of the address information is not more than the size of default heap memory JavaScript one heap memory of special Memory Allocation, the size of the heap memory distributed and the size of the default heap memory It is identical;
It is described from universal memory when the size of the address information is more than the size of default heap memory JavaScript one heap memory of special Memory Allocation, the size of the heap memory distributed meets the storage need of the address information Ask;
It is described to determine in the special internal memories of JavaScript with the presence or absence of remaining space not less than the address information The heap memory of size, including:If it is determined that there is heap memory in the special internal memories of JavaScript, the JavaScript is determined Heap memory in special internal memory with the presence or absence of remaining space not less than the size of the address information.
It is preferred that, the address information carries attribute information, and the attribute information is used to indicate that the address information is indicated Target storage position in the JavaScript object that stores can be recovered/can not be recovered.
It is preferred that, the target storage position is located in the universal memory.
A kind of JavaScript object storage device, including:
First determining unit, is produced for determining JavaScript engine during JavaScript scripts are handled JavaScript object;
Acquiring unit, for the JavaScript object to be stored to target storage position, and is obtained for indicating institute The address information of target storage position is stated, the target storage position is different from the special internal memories of JavaScript;
Second determining unit, for being determined from the special internal memories of the JavaScript for storing the address information First object heap memory, the remaining space of the first object heap memory is more than the size of the address information;
Memory cell, for the address information to be stored to the first object heap memory.
It is preferred that, second determining unit, including:
3rd determining unit, for determining in the special internal memories of the JavaScript with the presence or absence of remaining space not less than institute State the heap memory of the size of address information;
4th determining unit, for if it is determined that there is remaining space in the special internal memories of the JavaScript not less than described The heap memory of the size of address information, determines first object heap memory, described first from the special internal memories of the JavaScript The remaining space of target heap memory is not less than the size of the address information;
Comparing unit, for if it is determined that remaining space is not present in the special internal memories of the JavaScript more than or equal to described The heap memory of the size of address information, the size and the size of default heap memory of relatively more described address information;
When the first allocation unit, size for being not more than default heap memory when the size of the address information, from logical With being the JavaScript one heap memory of special Memory Allocation in internal memory, the size of the heap memory distributed with it is described default Heap memory size it is identical;
Second allocation unit, for when the size of the address information is more than the size of default heap memory, from general It is the JavaScript one heap memory of special Memory Allocation in internal memory, the size of the heap memory distributed meets the address The storage demand of information.
A kind of JavaScript object recovery method based on described JavaScript object storage method, including:
In the case where meeting JavaScript object recovery condition, the second mesh is determined from the special internal memories of JavaScript Mark heap memory;
Discharge each address information in the second target heap memory, and the target storage that the address information is indicated The JavaScript object stored in position.
It is preferred that, target address information is not present in the second target heap memory, what the target address information was carried Attribute information indicates that the JavaScript object stored in the target storage position that the target address information is indicated can not be returned Receive.
A kind of JavaScript object retracting device, including:
5th determining unit, it is special from JavaScript in the case where meeting JavaScript object recovery condition With determining the second target heap memory in internal memory;
Releasing unit, for discharging each address information in the second target heap memory, and the address information The JavaScript object stored in the target storage position of instruction.
The embodiment of the present application provides a kind of storage of JavaScript object, recovery method and device, by by determination JavaScript object is stored to target storage position (being different from the special internal memories of JavaScript), is obtained for indicating that target is deposited The address information that storage space is put;The mode of first object heap memory and storage address information is determined from the special internal memories of JavaScript The storage to JavaScript object is realized, the JavaScript that JavaScript engine is produced in the process of running is reduced Object saves universal memory, improves the operational efficiency of digital TV middleware to the occupancy of the special internal memories of JavaScript. Accordingly, by providing the JavaScript object recovery method for JavaScript object storage method, realize pair The recovery of the special internal memories of JavaScript.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments described in invention, for those of ordinary skill in the art, on the premise of not paying creative work, Other accompanying drawings can also be obtained according to these accompanying drawings.
A kind of JavaScript object storage method flow chart that Fig. 1 provides for the embodiment of the present application;
Fig. 2 determines to be used to store described for one kind that the embodiment of the present application is provided from the special internal memories of the JavaScript The method flow diagram of the first object heap memory of address information;
Determine to be used to store institute in another special internal memory from the JavaScript that Fig. 3 provides for the embodiment of the present application State the method flow diagram of the first object heap memory of address information;
A kind of structural representation for JavaScript object storage device that Fig. 4 provides for the embodiment of the present application;
A kind of JavaScript object recovery method flow chart that Fig. 5 provides for the embodiment of the present application;
A kind of structural representation for JavaScript object retracting device that Fig. 6 provides for the embodiment of the present application.
Embodiment
In order that those skilled in the art more fully understand the technical scheme in the present invention, below in conjunction with of the invention real The accompanying drawing in example is applied, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described implementation Example only a part of embodiment of the invention, rather than whole embodiments.Based on the embodiment in the present invention, this area is common The every other embodiment that technical staff is obtained under the premise of creative work is not made, should all belong to protection of the present invention Scope.
Embodiment:
A kind of JavaScript object storage method flow chart that Fig. 1 provides for the embodiment of the present application.
As shown in figure 1, this method includes:
S101, determine JavaScript engine produce JavaScript pairs during JavaScript scripts are handled As;
S102, the JavaScript object stored to target storage position, and obtained for indicating that the target is deposited The address information that storage space is put, the target storage position is different from the special internal memories of JavaScript;
Optionally, the target storage position is that in universal memory, the universal memory separates described The special internal memories of JavaScript, the special internal memories of JavaScript are only used for the JavaScript engine in the process of running Memory Allocation, realize and the JavaScript engine produced during JavaScript scripts are handled The storage of JavaScript object.
S103, determine in the first object heap for storing the address information from the special internal memories of the JavaScript Deposit, the remaining space of the first object heap memory is more than the size of the address information;
S104, the address information stored to the first object heap memory.
Fig. 2 determines to be used to store described for one kind that the embodiment of the present application is provided from the special internal memories of the JavaScript The method flow diagram of the first object heap memory of address information.
As shown in Fig. 2 this method includes:
S201, determine in the special internal memories of the JavaScript with the presence or absence of remaining space not less than the address information The heap memory of size;If it is determined that it is big not less than the address information to there is remaining space in the special internal memories of JavaScript Small heap memory, performs step S202;If it is determined that being more than or equal in the special internal memories of JavaScript in the absence of remaining space The heap memory of the size of the address information, performs step S203;
S202, determination first object heap memory, the first object heap memory from the JavaScript special internal memories Remaining space be not less than the address information size;
The size of address information described in S203, comparison and the size of default heap memory;When the size of the address information During the size of no more than default heap memory, step S204 is performed;When the size of the address information is more than default heap memory Size when, perform step S205;
S204, it is in the JavaScript one heap memory of special Memory Allocation, the heap distributed from universal memory The size deposited is identical with the size of the default heap memory;
S205, it is in the JavaScript one heap memory of special Memory Allocation, the heap distributed from universal memory The size deposited meets the storage demand of the address information.
Optionally, the size of the heap memory distributed meets the storage demand of the address information, including:The heap distributed The size of internal memory is not less than the size of the address information.
Determine to be used to store institute in another special internal memory from the JavaScript that Fig. 3 provides for the embodiment of the present application State the method flow diagram of the first object heap memory of address information.
As shown in figure 3, this method includes:
S301, determine in the special internal memories of the JavaScript whether there is heap memory;If it is determined that the JavaScript Heap memory is not present in special internal memory;Perform step S304;If it is determined that there is heap memory in the special internal memories of JavaScript; Perform step S302;
S302, determine in the special internal memories of the JavaScript with the presence or absence of remaining space not less than the address information The heap memory of size;If it is determined that it is big not less than the address information to there is remaining space in the special internal memories of JavaScript Small heap memory, performs step S303;If it is determined that being more than or equal in the special internal memories of JavaScript in the absence of remaining space The heap memory of the size of the address information, performs step S304;
S303, determination first object heap memory, the first object heap memory from the JavaScript special internal memories Remaining space be not less than the address information size;
The size of address information described in S304, comparison and the size of default heap memory;When the size of the address information During the size of no more than default heap memory, step S305 is performed;When the size of the address information is more than default heap memory Size when, perform step S306;
S305, it is in the JavaScript one heap memory of special Memory Allocation, the heap distributed from universal memory The size deposited is identical with the size of the default heap memory;
S306, it is in the JavaScript one heap memory of special Memory Allocation, the heap distributed from universal memory The size deposited meets the storage demand of the address information.
Further, attribute information is carried in the address information in the embodiment of the present application, the attribute information is used to indicate The JavaScript object stored in the target storage position that the address information is indicated can be recovered/can not be recovered.
For example, however, it is determined that JavaScript engine generates two during JavaScript scripts are handled JavaScript object, JavaScript object 1 and JavaScript object 2;Believe with the corresponding address of JavaScript object 1 The attribute information that breath is carried indicates that the JavaScript object 1 can be recovered;Believe with the corresponding address of JavaScript object 2 The attribute information that breath is carried indicates that the JavaScript object 2 can not be recovered.
The embodiment of the present application provides a kind of JavaScript object storage method, by by the JavaScript object of determination Store to target storage position (being different from the special internal memories of JavaScript), obtain the address for indicating target storage position and believe Breath;The mode of first object heap memory and storage address information is determined from the special internal memories of JavaScript to be realized pair The storage of JavaScript object, reduces the JavaScript object pair that JavaScript engine is produced in the process of running The occupancy of the special internal memories of JavaScript, saves universal memory, improves the operational efficiency of digital TV middleware.
A kind of structural representation for JavaScript object storage device that Fig. 4 provides for the embodiment of the present application.
As shown in figure 4, the device includes:
First determining unit 41, for determining that JavaScript engine is produced during JavaScript scripts are handled JavaScript object;
Acquiring unit 42, for the JavaScript object to be stored to target storage position, and is obtained for indicating The address information of the target storage position, the target storage position is different from the special internal memories of JavaScript;
Second determining unit 43, for determining to be used to store the address information from the special internal memories of the JavaScript First object heap memory, the remaining space of the first object heap memory is more than the size of the address information;
Memory cell 44, for the address information to be stored to the first object heap memory.
Optionally, second determining unit, including:
3rd determining unit, for determining in the special internal memories of the JavaScript with the presence or absence of remaining space not less than institute State the heap memory of the size of address information;
4th determining unit, for if it is determined that there is remaining space in the special internal memories of the JavaScript not less than described The heap memory of the size of address information, determines first object heap memory, described first from the special internal memories of the JavaScript The remaining space of target heap memory is not less than the size of the address information;
Comparing unit, for if it is determined that remaining space is not present in the special internal memories of the JavaScript more than or equal to described The heap memory of the size of address information, the size and the size of default heap memory of relatively more described address information;
When the first allocation unit, size for being not more than default heap memory when the size of the address information, from logical With being the JavaScript one heap memory of special Memory Allocation in internal memory, the size of the heap memory distributed with it is described default Heap memory size it is identical;
Second allocation unit, for when the size of the address information is more than the size of default heap memory, from general It is the JavaScript one heap memory of special Memory Allocation in internal memory, the size of the heap memory distributed meets the address The storage demand of information.
The embodiment of the present application provides a kind of JavaScript object storage device, by by the JavaScript object of determination Store to target storage position (being different from the special internal memories of JavaScript), obtain the address for indicating target storage position and believe Breath;The mode of first object heap memory and storage address information is determined from the special internal memories of JavaScript to be realized pair The storage of JavaScript object, reduces the JavaScript object pair that JavaScript engine is produced in the process of running The occupancy of the special internal memories of JavaScript, saves universal memory, improves the operational efficiency of digital TV middleware.
A kind of JavaScript object recovery method flow chart that Fig. 5 provides for the embodiment of the present application.
As shown in figure 5, this method includes:
S501, in the case where meeting JavaScript object recovery condition, from the special internal memories of JavaScript determine Second target heap memory;
Optionally, meet JavaScript object and reclaim condition, including:Receive JavaScript object and reclaim request.
It is described in the case where meeting JavaScript object recovery condition, is determined from the special internal memories of JavaScript Two target heap memories, including:Respond the JavaScript object received and reclaim request, reclaimed from the JavaScript object Ask to determine the second target heap memory in the special internal memories of JavaScript indicated.
Optionally, target address information is not present in the second target heap memory, what the target address information was carried Attribute information indicates that the JavaScript object stored in the target storage position that the target address information is indicated can not be returned Receive.That is, the second target heap memory is determined in the described special internal memory from JavaScript, including:From the special internal memories of JavaScript The attribute information that each address information in the second target heap memory of middle determination, the second target heap memory is carried is indicated JavaScript object can be recovered.
Each address information in S502, release the second target heap memory, and the mesh that the address information is indicated The JavaScript object stored in mark storage location.
Optionally, each address information in release the second target heap memory, and the address information refer to The JavaScript object stored in the target storage position shown, including:Discharge in the second target heap memory each Stored in the target storage position that each address information in location information, and release the second target heap memory is indicated JavaScript object.
The embodiment of the present application provides a kind of JavaScript object recovery method, and the JavaScript is directed to by providing The JavaScript object recovery method of object storage method, realizes the recovery to the special internal memories of JavaScript.
A kind of structural representation for JavaScript object retracting device that Fig. 6 provides for the embodiment of the present application.
As shown in fig. 6, the device includes:
5th determining unit 61, in the case where meeting JavaScript object recovery condition, from JavaScript The second target heap memory is determined in special internal memory;
Releasing unit 62, for discharging each address information in the second target heap memory, and address letter Cease the JavaScript object stored in the target storage position indicated.
The embodiment of the present application provides a kind of JavaScript object retracting device, and the JavaScript is directed to by providing The JavaScript object retracting device of object storage method, realizes the recovery to the special internal memories of JavaScript.
The embodiment of each in the present invention is described by the way of progressive, and what each embodiment was stressed is and other realities Apply the difference of example, between each embodiment identical similar portion mutually referring to.For device disclosed in embodiment Speech, because it is corresponded to the method disclosed in Example, so description is fairly simple, related part is referring to method part illustration .
It the above is only the preferred embodiment of the present invention, make skilled artisans appreciate that or realizing of the invention.It is right A variety of modifications of these embodiments will be apparent to one skilled in the art, general original as defined herein Reason can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, the present invention will not Be intended to be limited to the embodiments shown herein, and be to fit to it is consistent with principles disclosed herein and features of novelty most Wide scope.

Claims (10)

1. a kind of JavaScript object storage method, it is characterised in that including:
Determine the JavaScript object that JavaScript engine is produced during JavaScript scripts are handled;
The JavaScript object is stored to target storage position, and obtains the ground for indicating the target storage position Location information, the target storage position is different from the special internal memories of JavaScript;
The first object heap memory for storing the address information, described are determined from the special internal memories of the JavaScript The remaining space of one target heap memory is more than the size of the address information;
The address information is stored to the first object heap memory.
2. according to the method described in claim 1, it is characterised in that determine to use in the special internal memory from the JavaScript In the first object heap memory for storing the address information, including:
Determine the heap with the presence or absence of remaining space not less than the size of the address information in the special internal memories of the JavaScript Internal memory;
If it is determined that existing in the special internal memories of JavaScript in heap of the remaining space not less than the size of the address information Deposit, first object heap memory, the remaining space of the first object heap memory are determined from the special internal memories of the JavaScript Not less than the size of the address information;
If it is determined that remaining space is not present in the special internal memories of JavaScript more than or equal to the size of the address information Heap memory, the size and the size of default heap memory of relatively more described address information;
It is described from universal memory when the size of the address information is not more than the size of default heap memory JavaScript one heap memory of special Memory Allocation, the size of the heap memory distributed and the size of the default heap memory It is identical;
It is the JavaScript from universal memory when the size of the address information is more than the size of default heap memory Special one heap memory of Memory Allocation, the size of the heap memory distributed meets the storage demand of the address information.
3. method according to claim 2, it is characterised in that it is determined that whether being deposited in the special internal memories of the JavaScript Before heap memory of the remaining space not less than the size of the address information, this method also includes:
Determine to whether there is heap memory in the special internal memories of the JavaScript;
If it is determined that heap memory is not present in the special internal memories of JavaScript, relatively the size of the address information with it is default The size of heap memory;
It is described from universal memory when the size of the address information is not more than the size of default heap memory JavaScript one heap memory of special Memory Allocation, the size of the heap memory distributed and the size of the default heap memory It is identical;
It is the JavaScript from universal memory when the size of the address information is more than the size of default heap memory Special one heap memory of Memory Allocation, the size of the heap memory distributed meets the storage demand of the address information;
The size for determining to be not less than the address information in the special internal memories of JavaScript with the presence or absence of remaining space Heap memory, including:If it is determined that there is heap memory in the special internal memories of JavaScript, determine that the JavaScript is special Heap memory in internal memory with the presence or absence of remaining space not less than the size of the address information.
4. method according to claim 3, it is characterised in that the address information carries attribute information, the attribute letter Cease can be recovered for the JavaScript object for indicating to store in the target storage position that the address information is indicated/can not be by Reclaim.
5. according to the method described in claim 1, it is characterised in that the target storage position is located in the universal memory.
6. a kind of JavaScript object storage device, it is characterised in that including:
First determining unit, is produced for determining JavaScript engine during JavaScript scripts are handled JavaScript object;
Acquiring unit, for the JavaScript object to be stored to target storage position, and is obtained for indicating the mesh The address information of storage location is marked, the target storage position is different from the special internal memories of JavaScript;
Second determining unit, for determined from the special internal memories of the JavaScript for store the address information first Target heap memory, the remaining space of the first object heap memory is more than the size of the address information;
Memory cell, for the address information to be stored to the first object heap memory.
7. device according to claim 6, it is characterised in that second determining unit, including:
3rd determining unit, for determining in the special internal memories of the JavaScript with the presence or absence of remaining space not less than described The heap memory of the size of location information;
4th determining unit, for if it is determined that there is remaining space in the special internal memories of the JavaScript not less than the address The heap memory of the size of information, determines first object heap memory, the first object from the special internal memories of the JavaScript The remaining space of heap memory is not less than the size of the address information;
Comparing unit, for if it is determined that remaining space is not present in the special internal memories of the JavaScript is more than or equal to the address The heap memory of the size of information, the size and the size of default heap memory of relatively more described address information;
When the first allocation unit, size for being not more than default heap memory when the size of the address information, from general interior It is the JavaScript one heap memory of special Memory Allocation, the size of the heap memory distributed and the default heap in depositing The size of internal memory is identical;
Second allocation unit, for when the size of the address information is more than the size of default heap memory, from universal memory In be the JavaScript one heap memory of special Memory Allocation, the size of the heap memory distributed meets the address information Storage demand.
8. a kind of JavaScript object storage method based on as described in above-mentioned claim 1-5 any one JavaScript object recovery method, it is characterised in that including:
In the case where meeting JavaScript object recovery condition, the second target heap is determined from the special internal memories of JavaScript Internal memory;
Discharge each address information in the second target heap memory, and the target storage position that the address information is indicated The JavaScript object of middle storage.
9. method according to claim 8, it is characterised in that destination address is not present in the second target heap memory and believes Breath, the attribute information that the target address information is carried indicates to store in the target storage position that the target address information is indicated JavaScript object can not be recovered.
10. a kind of JavaScript object retracting device, it is characterised in that including:
5th determining unit, it is special interior from JavaScript in the case where meeting JavaScript object recovery condition Deposit the second target heap memory of middle determination;
Releasing unit, for discharging each address information in the second target heap memory, and the address information is indicated Target storage position in the JavaScript object that stores.
CN201710322364.5A 2017-05-09 2017-05-09 JavaScript object storage and recovery method and device Active CN107168887B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710322364.5A CN107168887B (en) 2017-05-09 2017-05-09 JavaScript object storage and recovery method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710322364.5A CN107168887B (en) 2017-05-09 2017-05-09 JavaScript object storage and recovery method and device

Publications (2)

Publication Number Publication Date
CN107168887A true CN107168887A (en) 2017-09-15
CN107168887B CN107168887B (en) 2020-09-04

Family

ID=59814063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710322364.5A Active CN107168887B (en) 2017-05-09 2017-05-09 JavaScript object storage and recovery method and device

Country Status (1)

Country Link
CN (1) CN107168887B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110020314A (en) * 2017-12-21 2019-07-16 广州市动景计算机科技有限公司 Web page data processing method, calculates equipment and storage medium at device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763308A (en) * 2009-12-25 2010-06-30 中国科学院计算技术研究所 Pool allocation method for heap data at running time
US20100235587A1 (en) * 2009-03-16 2010-09-16 Argilsoft Llc Staged Software Transactional Memory
US20140040565A1 (en) * 2012-07-31 2014-02-06 Anthony Asaro Shared Memory Space in a Unified Memory Model
CN104412240A (en) * 2012-07-27 2015-03-11 英特尔公司 System and method for memory management
CN105227342A (en) * 2014-06-27 2016-01-06 瞻博网络公司 For the graphic data base that the service in network service zone is planned and configured
CN105589890A (en) * 2014-11-05 2016-05-18 中国银联股份有限公司 Memory sharing frame system
CN105630599A (en) * 2014-10-28 2016-06-01 龙芯中科技术有限公司 Video memory distribution method and device based on 32/64-bit hybrid operating system
CN105808219A (en) * 2014-12-29 2016-07-27 中国移动通信集团公司 Memory space allocation method and apparatus

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100235587A1 (en) * 2009-03-16 2010-09-16 Argilsoft Llc Staged Software Transactional Memory
CN101763308A (en) * 2009-12-25 2010-06-30 中国科学院计算技术研究所 Pool allocation method for heap data at running time
CN104412240A (en) * 2012-07-27 2015-03-11 英特尔公司 System and method for memory management
US20140040565A1 (en) * 2012-07-31 2014-02-06 Anthony Asaro Shared Memory Space in a Unified Memory Model
CN105227342A (en) * 2014-06-27 2016-01-06 瞻博网络公司 For the graphic data base that the service in network service zone is planned and configured
CN105630599A (en) * 2014-10-28 2016-06-01 龙芯中科技术有限公司 Video memory distribution method and device based on 32/64-bit hybrid operating system
CN105589890A (en) * 2014-11-05 2016-05-18 中国银联股份有限公司 Memory sharing frame system
CN105808219A (en) * 2014-12-29 2016-07-27 中国移动通信集团公司 Memory space allocation method and apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110020314A (en) * 2017-12-21 2019-07-16 广州市动景计算机科技有限公司 Web page data processing method, calculates equipment and storage medium at device
CN110020314B (en) * 2017-12-21 2023-09-29 阿里巴巴(中国)有限公司 Web page data processing method, device, computing equipment and storage medium

Also Published As

Publication number Publication date
CN107168887B (en) 2020-09-04

Similar Documents

Publication Publication Date Title
CN107145451A (en) A kind of JavaScript object storage, recovery method and device
US6701334B1 (en) Methods and apparatus for implementing individual class loaders
KR102077149B1 (en) Method for managing memory and apparatus thereof
US11934680B2 (en) Systems and methods for booting from NAND flash using squashfs to maximize memory
CN106325879A (en) Method and device for installing driver and electronic equipment
WO2017168582A1 (en) Image reception and reproduction device, image generation and transmission device, display system, image reception and reproduction method, image generation and transmission method, image reception and reproduction program, and image generation and transmission program
CN108984295A (en) Method for recovering internal storage, computer installation and computer readable storage medium
US20210089442A1 (en) Dynamically allocating memory pool subinstances
CN112597337A (en) Method, device, equipment and medium for viewing video monitoring content
CN107168887A (en) A kind of JavaScript object storage, recovery method and device
CN109218458B (en) Writing method and device of MAC address and computer readable storage medium
CN108052575A (en) File scanning method, equipment and storage medium
CN112671810B (en) Data processing method and device, electronic equipment, server and storage equipment
CN107911712A (en) Data buffering method and electronic equipment
CN109302639B (en) Bullet screen message distribution method, bullet screen message distribution device, terminal and storage medium
CN105760251A (en) Data backup method and device
CN110381365A (en) Video takes out frame method, device and electronic equipment
CN107666622A (en) Method, set top box and the storage medium of updating set-top box software
CN112153459A (en) Method and device for screen projection display
CN116032614A (en) Container network micro-isolation method, device, equipment and medium
CN110225371B (en) Storage and transmission method for supporting space blocking based on media self-attribute
CN107566904A (en) A kind of resource data updating method and set-top box device
US9037805B2 (en) Managing a region cache
CN108255568B (en) Terminal interface display method and device, terminal and storage medium
CN109451361B (en) Code stream definition switching method and device for Android system, terminal and readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant