Re: memory issue with nth

2008-12-11 Thread Rich Hickey
On Dec 11, 5:56 pm, Rich Hickey wrote: > On Dec 11, 2:28 pm, "Christian Vest Hansen" > wrote: > > > Wo-hoo! I found a fix. > > > I think it is only a JVM issue to the extent that the 1.6 JVM might be > > able to mask the bug by doing escape analysis or some such other > > magic, but that dosn'

Re: memory issue with nth

2008-12-11 Thread Rich Hickey
On Dec 11, 2:28 pm, "Christian Vest Hansen" wrote: > Wo-hoo! I found a fix. > > I think it is only a JVM issue to the extent that the 1.6 JVM might be > able to mask the bug by doing escape analysis or some such other > magic, but that dosn't mean that the bug isn't there. > > It's a super-simp

Re: memory issue with nth

2008-12-11 Thread Paul Mooser
Nice job finding it ...! Once I could not reproduce it on JDK 6, I stopped looking for a real answer. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googl

Re: memory issue with nth

2008-12-11 Thread Christian Vest Hansen
Wo-hoo! I found a fix. I think it is only a JVM issue to the extent that the 1.6 JVM might be able to mask the bug by doing escape analysis or some such other magic, but that dosn't mean that the bug isn't there. It's a super-simple little thing, and I can't imagine a CA is needed to apply it. P

Re: memory issue with nth

2008-12-11 Thread Paul Mooser
I think this might just be a JVM version issue. I can reproduce this issue with a 1.5 JVM, but I can't reproduce it with 1.6. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, sen

Re: memory issue with nth

2008-12-09 Thread Paul Mooser
I believe my analysis was incorrect. Never mind! On Dec 9, 1:23 pm, Paul Mooser <[EMAIL PROTECTED]> wrote: > This does NOT occur if I do this directly from the repl (ie, java -cp > clojure.jar clojure.lang.Repl), but it DOES happen if I am accessing > the repl through SLIME. Does anyone know why

Re: memory issue with nth

2008-12-09 Thread Paul Mooser
This does NOT occur if I do this directly from the repl (ie, java -cp clojure.jar clojure.lang.Repl), but it DOES happen if I am accessing the repl through SLIME. Does anyone know why this might be ? --~--~-~--~~~---~--~~ You received this message because you are

Re: memory issue with nth

2008-12-07 Thread Paul Mooser
Is there a way to access the bytecode that a given expression compiles into? I'm curious if it would make it easier to file a bug report on the JVM on any affected platforms. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Re: memory issue with nth

2008-12-07 Thread Christian Vest Hansen
On Sun, Dec 7, 2008 at 7:18 AM, Paul Mooser <[EMAIL PROTECTED]> 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

Re: memory issue with nth

2008-12-06 Thread Luc Prefontaine
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 (repeatedl

Re: memory issue with nth

2008-12-06 Thread Parth Malwankar
On Dec 7, 11:18 am, Paul Mooser <[EMAIL PROTECTED]> 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

Re: memory issue with nth

2008-12-06 Thread Paul Mooser
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 w

Re: memory issue with nth

2008-12-06 Thread Mark Engelberg
It doesn't blow the heap on my machine, using the "Clojure in a Box" setup, and I only have 1GB of memory total. I added a couple 0s, and it didn't make a difference. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: memory issue with nth

2008-12-06 Thread Christian Vest Hansen
On Sun, Dec 7, 2008 at 2:22 AM, Randall R Schulz <[EMAIL PROTECTED]> wrote: > > On Saturday 06 December 2008 17:11, Christian Vest Hansen wrote: >> I played around with some code, trying to explore the memory problems >> with 'filter' that is discussed in another thread, when I noticed an >> unexp

Re: memory issue with nth

2008-12-06 Thread Randall R Schulz
On Saturday 06 December 2008 17:11, Christian Vest Hansen wrote: > I played around with some code, trying to explore the memory problems > with 'filter' that is discussed in another thread, when I noticed an > unexpected behavior from 'nth'. > > Behold: > > user=> (nth (repeatedly (fn [] 0)) 1

memory issue with nth

2008-12-06 Thread Christian Vest Hansen
I played around with some code, trying to explore the memory problems with 'filter' that is discussed in another thread, when I noticed an unexpected behavior from 'nth'. Behold: user=> (nth (repeatedly (fn [] 0)) 1000) java.lang.OutOfMemoryError: Java heap space (NO_SOURCE_FILE:0) user=> (d