I run Java 6 on Unbuntu with an initial heap size of 500M and a maximum
of 1G.
I never use the default allocations.

$ java -version
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Server VM (build 1.6.0_03-b05, mixed mode)

user=> (time (nth (repeatedly (fn [] 0)) 100000000000))
"Elapsed time: 150984.333662 msecs"
0

I tested restricting the maximum heap size to 128M, no problem at all:

$ clojure
/tmpfs/clojure/clojure-contrib.jar:/home/lprefontaine/.clojure/lib . 
/tmpfs/clojure/clojure.jar
rlwrap --remember -c -b "(){}[],^%0@"";:''|\"
-f /home/lprefontaine/.clojure/.clj_completions java -Dpid=11051
-client -Xms128m -Xmx128m -XX:+UseConcMarkSweepGC -XX:
+HeapDumpOnOutOfMemoryError -cp .:/tmpfs/clojure/clojure.jar
clojure.lang.Repl  
Clojure
user=> (time (nth (repeatedly (fn [] 0)) 10000000))
"Elapsed time: 1211.868876 msecs"
0
user=> (time (nth (repeatedly (fn [] 0)) 100000000000))
"Elapsed time: 128680.557706 msecs"
0
user=> 

Increasing the # of iterations still works for me with a 128M heap.
I refreshed my Clojure version from CVS today (Saturday).

Luc
 
On Sat, 2008-12-06 at 22:18 -0800, Paul Mooser wrote:

> I also have this problem, unless I set my heap to be substantial -
> going up in increments of 128M, I need to have at least a 768M heap
> for this to not occur. That seems completely crazy, but the rest of
> you are saying you don't have this issue.
> 
> Maybe it's time to start looking at what platforms we are running, and
> how much memory you have the JVM configured to use? If people have
> their heap set to be large enough, they might not realize this is
> happening, or if it is a bug on a subset of platforms, then that might
> explain it as well.
> 
> I'm running on OS X Leopard, and I've tried both the 1.5 and 1.6 JVMs.
> I don't normally pass any non-standard memory size arguments to the VM
> unless I expect I'll need it for something I'm doing.
> 
> > 
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to