nux.xom.tests
Class DocumentMapTest
java.lang.Object
nux.xom.tests.DocumentMapTest
- public final class DocumentMapTest
- extends Object
Stress test putting infinitely many documents into a DocumentMap; an
OutOfMemoryError should never occur as a result of doing this, with
java -Xmx8m -verbose:gc
and
java -Xmx512m -verbose:gc
and without any -Xmx limit, both
with JDK 1.4 and 1.5 (Sun and IBM), both with client and server VM.
Test results:
Code and VMs works as expected without any leak, except that IBM JDK 1.4.2
(build cxia32142sr1a-20050209) fails due to a VM bug when
zlibCompressionLevel == -1 (this level is almost always a bad idea anyway).
Sun JDK >= 1.4 guarantees that all SoftReferences will be collected before
considering to throw an OutOfMemoryError. This is precisely the expected
behaviour (the idea that an auxiliary cache can lead to an OutOfMemoryError
would be insane).
- Author:
- whoschek@lbl.gov, $Author: hoschek3 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DocumentMapTest
public DocumentMapTest()
main
public static void main(String[] args)
throws Exception
- Throws:
Exception