Fixing subject.

On Sep 23, 1:25 pm, Jeff Palmucci <jpalmu...@gmail.com> wrote:
> I have a very simple test case in clojure 1.2:
>
> (def * 100000000* (count (range 0 100000000)))
>
> I have a loop running in another thread that periodically causes a full gc 
> and then prints the amount of used memory every 2 seconds. Evaluating the 
> above form, I get:
>
> Used memory: 0.079951296 G
> Used memory: 0.32577516 G
> Used memory: 0.847947752 G
> Used memory: 1.377162736 G
> Used memory: 1.878349032 G
> Used memory: 2.202150656 G
> Used memory: 2.686696656 G
> Used memory: 3.14701836 G
>
> ...
>
> Seems like something is holding onto the front of the sequence.
>
> However, if I use the following instead:
>
> (def *100000000* (#(count (range 0 100000000))))
>
> The problem goes away:
>
> Used memory: 0.07999508 G
> Used memory: 0.0799572 G
> Used memory: 0.07999796 G
> Used memory: 0.079997392 G
> Used memory: 0.111486904 G
> Used memory: 0.079995512 G
> Used memory: 0.11590836 G
> Used memory: 0.080138968 G
> Used memory: 0.080005136 G
> Used memory: 0.079963912 G
> Used memory: 0.07996396 G
> Used memory: 0.079964008 G
>
> Any ideas?

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to