Method and apparatus for freeing memory from an extensible markup language document object model tree active in an application cache
Abstract
The present invention relates to a garbage collector that uses an LRU algorithm to free memory from an XML DOM tree active in an application cache. According to one or more embodiments of the present invention, a threshold for the amount of memory permitted to reside in an application cache is set. Then, a garbage collector removes entries from the cache until it falls below the threshold. In one or more embodiments, a node table is used. When nodes are added to the XML DOM tree in the application cache the node table is updated. When the threshold for the amount of memory permitted to reside in the application cache is exceeded, the garbage collector applies an LRU algorithm uses the node table to determine which nodes to remove from the application cache. In one embodiment, the LRU algorithm scans the node table to determine the least recently used node in the table by examining time stamp entries in the table. Then, the algorithm removes that node and repeats the process until the XML DOM tree uses less memory in the cache than the threshold.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 4 · Forward citations: 44.
Claims (3 — 1 Independent, 2 Dependent)
- Claim 1Independent Claim
A method for freeing memory from an XML DOM tree in a cache, said method comprising: storing one or more identifiers in a node table which correspond to each of one or more nodes of said XML DOM tree; scanning said node table to locate a least recently used node using said identifiers; and removing said identifiers and said least recently used node, if said XML DOM tree occupies more memory then a threshold.
- Claim 2Depends on #1
The method of claim 1 wherein one of said identifiers comprises a time stamp entry associated with each of said nodes.
- Claim 3Depends on #2
The method of claim 2 wherein said scanning further comprises: examining said time stamp entry to find said least recently used node.
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗