You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by gr...@apache.org on 2001/01/16 23:35:02 UTC
cvs commit: xml-cocoon/src/org/apache/cocoon/store MemoryStore.java
greenrd 01/01/16 14:35:02
Modified: . changes.xml
src/org/apache/cocoon/store MemoryStore.java
Log:
fixed stupid store cleanup mistake, i did not understand the code at the time
Revision Changes Path
1.179 +5 -1 xml-cocoon/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/xml-cocoon/changes.xml,v
retrieving revision 1.178
retrieving revision 1.179
diff -u -r1.178 -r1.179
--- changes.xml 2001/01/16 17:40:11 1.178
+++ changes.xml 2001/01/16 22:34:58 1.179
@@ -4,7 +4,7 @@
<!--
History of Cocoon changes
- $Id: changes.xml,v 1.178 2001/01/16 17:40:11 greenrd Exp $
+ $Id: changes.xml,v 1.179 2001/01/16 22:34:58 greenrd Exp $
-->
<changes title="History of Changes">
@@ -19,6 +19,9 @@
<release version="@version@" date="@date@">
<action dev="RDG" type="fix">
+ Reversed store cleanup algorithm mistake. The store cleanup thread now works exactly as before.
+ </action>
+ <action dev="RDG" type="fix">
At long last, FIXED the Internet Explorer PDF bug! In fact there were at least 3 bugs involved here,
and YOU STILL NEED TO USE THE ?dummy=test.pdf WORKAROUND - see the FAQ for more details.
But, generated PDF files
@@ -143,6 +146,7 @@
LastModified oddities, and partly to improve memory usage efficiency.
</action>
<action dev="RDG" type="fix">
+ *** NOTE - this was later reversed - see above! ***
Made store cleanup algorithm more aggressive. Hopefully this should clear
up some of the OutOfMemoryErrors people have been having.
</action>
1.15 +4 -9 xml-cocoon/src/org/apache/cocoon/store/MemoryStore.java
Index: MemoryStore.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/store/MemoryStore.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- MemoryStore.java 2000/11/19 20:38:52 1.14
+++ MemoryStore.java 2001/01/16 22:35:01 1.15
@@ -1,4 +1,4 @@
-/*-- $Id: MemoryStore.java,v 1.14 2000/11/19 20:38:52 greenrd Exp $ --
+/*-- $Id: MemoryStore.java,v 1.15 2001/01/16 22:35:01 greenrd Exp $ --
============================================================================
The Apache Software License, Version 1.1
@@ -67,7 +67,7 @@
*
* @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
* @author <a href="mailto:michel.lehon@outwares.com">Michel Lehon</a>
- * @version $Revision: 1.14 $ $Date: 2000/11/19 20:38:52 $
+ * @version $Revision: 1.15 $ $Date: 2001/01/16 22:35:01 $
*/
public class MemoryStore implements Store, Status, Configurable, Runnable {
@@ -79,7 +79,7 @@
/**
* Indicates how big the heap size can grow to before the cleanup thread kicks in.
- * The default value is based on the default maximum heap size of 64Mb.
+ * The default value is based on the default maximum heap size of 60Mb.
*/
private int heapsize;
@@ -162,11 +162,6 @@
public void run() {
while (true) {
- // RDG (2000/11/19): Changed the algorithm to free store entries when EITHER
- // the heap is too big or the free RAM is too small, rather than both having to be
- // true as was previously the case. This is more intuitive and more forgiving
- // of configuration mistakes.
-
if (memoryLow ()) {
this.jvm.runFinalization();
this.jvm.gc();
@@ -184,7 +179,7 @@
}
public boolean memoryLow () {
- return jvm.totalMemory () > heapsize || jvm.freeMemory () < freememory;
+ return jvm.totalMemory () > heapsize && jvm.freeMemory () < freememory;
}
/**