Christophe Raffalli a écrit : > You need to make sure that a complete GC cycle has run after producing > your result, before > > (Gc.stat ()).Gc.live_words gives you what you want. > > The function you need is that one : > > val full_major : unit -> unit > I already do that before querying the live words count. > let x = ... in > (* here you are not sure x is collected even if the variable does not > appear after this comment *) > Thanks for making this clear. I was indeed thinking that collecting x here could require some sort of variable liveness analysis, and that the GC might not be that smart, and this is why I tried to put x in a function and prevent inlining, but I don't know if it is enough to make x definitely unreachable. > let y = 3 in > ... > > > Cheers, > Christophe > > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >
_______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs