caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christophe Raffalli <craff73@gmail.com>
To: OCaml <caml-list@inria.fr>
Subject: [Caml-list] Weak array semantics with mutually recursive values.
Date: Sat, 22 Jan 2011 17:29:26 +0100	[thread overview]
Message-ID: <4D3B05E6.3090103@univ-savoie.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 594 bytes --]


Hello,

Consider two mutually recursive values:

let rec x = (1,y) and y = (2,x)

for instance. They will become unreachable by the GC at the same cycle.
However,
if they are both added in a weak array, it seems that they may not be
removed at the same time from the array.

I have some code that seems to show that most of the time they are
removed at the same times, but very rarely this fails.

The description in weak.mli does not imply this, because it just says
"may be removed" and not "must be removed".

What do you think about this ?

Regards,
Christophe




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

             reply	other threads:[~2011-01-22 16:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-22 16:29 Christophe Raffalli [this message]
     [not found] ` <4d3b1a5d.ccefd80a.600d.177e@mx.google.com>
2011-01-22 19:41   ` Christophe Raffalli
2011-01-24 12:45 ` Damien Doligez
2011-01-24 21:41   ` Christophe Raffalli
2011-01-26 13:13     ` Damien Doligez

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=4D3B05E6.3090103@univ-savoie.fr \
    --to=craff73@gmail.com \
    --cc=caml-list@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).