caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Tiphaine Turpin <Tiphaine.Turpin@irisa.fr>
To: Christophe Raffalli <Christophe.Raffalli@univ-savoie.fr>,
	caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Re: Mastering the garbage collector
Date: Fri, 26 Jun 2009 09:28:27 +0200	[thread overview]
Message-ID: <4A44789B.9000905@irisa.fr> (raw)
In-Reply-To: <4A43BE22.1080802@univ-savoie.fr>

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
>   


  reply	other threads:[~2009-06-26  7:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-25 14:57 Tiphaine Turpin
2009-06-25 15:14 ` Sylvain Le Gall
2009-06-25 15:37   ` [Caml-list] " Tiphaine Turpin
2009-06-25 18:12     ` Christophe Raffalli
2009-06-26  7:28       ` Tiphaine Turpin [this message]
2009-06-27  7:51         ` Christophe Raffalli
2009-06-25 15:53 ` [Caml-list] " Julien Signoles

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A44789B.9000905@irisa.fr \
    --to=tiphaine.turpin@irisa.fr \
    --cc=Christophe.Raffalli@univ-savoie.fr \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).