Details
-
Type:
Defect
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: Release 1.3
-
Fix Version/s: Release 1.3
-
Component/s: None
-
Labels:None
-
Environment:I tested on both Mac OS X 10.6.6 with Hotspot 64-bit JVM 1.6.0_24, and Ubuntu Linux 10.4 LTS with Hotspot 64-bit JVM 1.6.0_24. I suspect the issue is similar across JVMs.
Description
File names here refer to attached files. Instead of attaching a large input file, I attach a small program that can be run to generate a large input file. To generate it, edit make-input-file.sh to point to a Clojure 1.2 JAR. Also edit run.sh to point to a Clojure 1.2 and 1.3 alpha 6 JAR. Do the following one time to create a ~ 125 Mbyte file long-input.txt:
./make-input-file.sh
With the JVMs I tested, I got these results, where the first argument is 1.2 or 1.3 for the Clojure version, and the second argument is the number of Mbytes to use for the max heap size of the JVM (i.e. the numeric value in the -Xmx<num>m argument in the java command line):
./run.sh 1.2 384 # failed with OutOfMemoryError 5/5 times tried
./run.sh 1.2 416 # succeeded 5/5 times tried
./run.sh 1.3 960 # failed 5/5 times tried
./run.sh 1.3 1048 # succeeded 5/5 or 4/5 times tried, for Mac OS X or Linux, respectively
I believe the issue is that with 1.3 alpha 6, the JVM is holding on to the head of the sequence called 'lines' for the duration of the execution of the function fasta-dna-str-with-desc-beginning, whereas 1.2 is losing the head after getting past the first when-let, and thus using significantly less memory.
Works fine with 416MB using what will become clojure-1.4.0 (commit 59d3c724684c212fbb5eafaaaac30761c2c75a37).