Method and apparatus for freeing memory from an extensible markup language document object model tree active in an application cache
First Claim
1. 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.
3 Assignments
0 Petitions
Accused Products
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.
-
Citations
18 Claims
-
1. 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. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A computer program product comprising:
a computer usable medium having computer readable program code embodied therein configured to free memory from an XML DOM tree in a cache, said computer program product comprising;
computer readable code configured to cause a computer to store one or more identifiers for each of one or more nodes in said XML DOM tree in a node table;
computer readable code configured to cause a computer to scan said identifiers to locate a least recently used node; and
computer readable code configured to cause a computer to remove said identifiers and said least recently used node, if said XML DOM tree occupies more memory then a threshold. - View Dependent Claims (8, 9, 10, 11, 12, 14, 15, 16, 17, 18)
-
13. A garbage collector for freeing memory from an XML DOM tree in a cache, said garbage collector comprising:
-
a threshold for a maximum amount of memory that may reside in said cache;
a node table configured to store one or more identifiers which correspond to each of one or more nodes of said XML DOM tree;
a scanner for examining said identifiers to locate a least recently used node; and
a garbage collector for removing said identifiers and said least recently used node, if said XML DOM tree occupies more memory then said threshold.
-
Specification