I have been working hard to understand the issue, and it seems to related to 
the creation of lots of functions using eval.
for instance if you run: (for [_ (range 10000)] (eval (read-string "(fn [x] 
(inc x))")))
2 or 3 time it will consume all  PermGen. Is there any way to palliate this 
problem?

As regards head retention, I believe it's not the problem because I run all my 
processing in one line[1] the repl without assigning the result to any var, 
then I press "1" four times to avoid the repl
retain references in "*1 *2 *3" variables, after that I run (System/gc) several 
times and then I take the memory snapshot using yourkit. Finally, in the mem 
snapshot there are no live instances inside
mentat.* packages generated by clojure.

[1] (-> (g/build-dot-file [(t/trace-gen ArrayStack sel-fn)]) d/dot (d/save! 
"arrayStack.eps" {:format :eps}))

Regards,
-- 
Pablo

On 05/23/2014 02:04 AM, Mars0i wrote:
>
>
> On Wednesday, May 21, 2014 7:43:41 PM UTC-5, Bauna wrote:
>
>     The main loop is here[2] in the function trace-gen that generates a lazy 
> list. I don't care about the memory required during the execution of the 
> function but after it should be GC'd all.
>
>
> Just a quick question: Have you checked to make sure that that you are not 
> keeping a reference to the beginning (or other position) of the lazy list 
> after you're done processing it? 
> -- 
> 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
> ---
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com 
> <mailto:clojure+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to