caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jon Harrop <jonathandeanharrop@googlemail.com>
To: "'Damien Doligez'" <damien.doligez@inria.fr>, <caml-list@inria.fr>
Subject: RE: [Caml-list] How does OCaml update references when values are moved by the GC?
Date: Sat, 30 Oct 2010 18:15:56 +0100	[thread overview]
Message-ID: <018c01cb7856$1e228350$5a6789f0$@com> (raw)
In-Reply-To: <8277D889-83E2-4037-91B3-3EB5E9EB2EA9@inria.fr>

I was hoping for a little more detail, of course. :-)

How is the mapping from old to new pointers stored? Does the GC rewrite all
of the thread-local stacks in series before allowing any of them to
continue? Does the write barrier record pointers written into the major heap
so only those specific locations are rewritten at minor heap collections but
the entire major heap is rewritten upon compaction? Can the GC distinguish
between an array of ints and an array of pointers at run-time in order to
avoid traversing all of the ints when trying to rewrite pointers?

Also, any idea what the maximum proportion of the running time of a program
is spent doing this rewriting? For example, if you fill a float->float hash
table with values does updating the pointers in the major heap account for a
significant proportion of the total running time of the program?

Cheers,
Jon.

> -----Original Message-----
> From: caml-list-bounces@yquem.inria.fr [mailto:caml-list-
> bounces@yquem.inria.fr] On Behalf Of Damien Doligez
> Sent: 29 October 2010 08:48
> To: caml users
> Subject: Re: [Caml-list] How does OCaml update references when values
> are moved by the GC?
> 
> 
> On 2010-10-28, at 23:48, Jon Harrop wrote:
> 
> > How does OCaml update references in the stacks and heap when values
> are
> > moved by the GC?
> 
> 
> They are updated by the GC, of course.
> 
> -- Damien
> 
> _______________________________________________
> 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


  parent reply	other threads:[~2010-10-30 17:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <418632253.26199.1288302511712.JavaMail.root@zmbs1.inria.fr>
2010-10-29  7:47 ` Damien Doligez
2010-10-30 11:14   ` Elias Gabriel Amaral da Silva
2010-10-30 17:15   ` Jon Harrop [this message]
2010-10-30 17:38     ` Michael Ekstrand
2010-10-30 20:40       ` Jon Harrop
2010-11-03  9:49         ` Richard Jones
2010-10-30 20:40   ` Jon Harrop
     [not found]   ` <1033013046.78315.1288458970997.JavaMail.root@zmbs4.inria.fr>
2010-11-02 10:25     ` Xavier Leroy

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='018c01cb7856$1e228350$5a6789f0$@com' \
    --to=jonathandeanharrop@googlemail.com \
    --cc=caml-list@inria.fr \
    --cc=damien.doligez@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).