caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christophe Raffalli <craff73@gmail.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Weak array semantics with mutually recursive values.
Date: Mon, 24 Jan 2011 22:41:04 +0100	[thread overview]
Message-ID: <4D3DF1F0.2080008@univ-savoie.fr> (raw)
In-Reply-To: <5E60A32A-4DAB-4870-AD8F-20080071B81B@inria.fr>

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

Le 24/01/11 13:45, Damien Doligez a écrit :
> On 2011-01-22, at 17:29, Christophe Raffalli wrote:
>
>> 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.
> As far as I can tell, it should never happen.  Do you have a good
> repro case?
Hello,

I will try to investigate further my example to make sure it is not
another problem. If I get
a simple repro case, I will post it.

What I was considering recently (after my second post) is the following
scenario:

t and u are two inaccessible mutually recursive values, but one is still
in the minor heap (t) while the other (u) has been promoted (if a minor
cycle just ended between the allocation of both values, this seems
possible even if unlikely). In this case, the finalisation of t and its
removal from a weak array might occur long before the finalisation of u ?

Cheers,
Christophe



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

  reply	other threads:[~2011-01-24 21:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-22 16:29 Christophe Raffalli
     [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 [this message]
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=4D3DF1F0.2080008@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).