Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Damien Doligez <damien.doligez@inria.fr>
To: guillaume.yziquel@citycable.ch
Cc: caml-list List <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] problem creating .cma library
Date: Wed, 20 Jan 2010 15:42:07 +0100	[thread overview]
Message-ID: <1E7D405B-3768-43E5-B304-E32CEBFB56D4@inria.fr> (raw)
In-Reply-To: <4B48D912.8090602@citycable.ch>


On 2010-01-09, at 20:29, Guillaume Yziquel wrote:

> The remembere set, in this context, explains why I would need  
> Store_field when dealing with pure OCaml world. When wrapping  
> pointers to the C heap in abstract blocks, I do not see the point of  
> Store_field, and it seems to me that Field= assignment is fine. Am I  
> mistaken?

When assigning into an Abstract block, Store_field is not needed.
Moreover, when assigning or overwriting a non-pointer in an Abstract
block, Store_field is forbidden.  So you'd better never use it to
assign into an Abstract block.

A trick to remember it: the contents of an Abstract block is not
fields as far as the GC is concerned.

> I assume that caml_local_roots gets restored by a mechanism in the  
> 'try' of the 'try / with' construct after the siglongjmp of  
> caml_raise.
>
> Therefore it should be OK to use caml_raise_with_args before  
> End_roots().
>
> Am I right, or is this plainly wild guessing?


Your wild guessing is correct (line 249 of interp.c).

-- Damien


      parent reply	other threads:[~2010-01-20 14:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-30 17:48 rouanvd
2009-12-30 23:30 ` [Caml-list] " Guillaume Yziquel
2010-01-05 13:04   ` Damien Doligez
2010-01-08 23:38     ` Guillaume Yziquel
2010-01-08 23:54       ` Basile STARYNKEVITCH
2010-01-09  0:11         ` Guillaume Yziquel
2010-01-09  7:58           ` David Allsopp
2010-01-09 11:33             ` Guillaume Yziquel
2010-01-09 12:52               ` Richard Jones
2010-01-09 14:00                 ` Daniel Bünzli
2010-01-09 14:02                   ` Daniel Bünzli
2010-01-09 14:21                     ` Joel Reymont
2010-01-09 19:36                   ` Guillaume Yziquel
2010-01-10  2:11                     ` Daniel Bünzli
2010-01-11 17:14                       ` Guillaume Yziquel
2010-01-10 13:31                     ` ygrek
2010-01-11 18:01                       ` Guillaume Yziquel
2010-01-09 19:29                 ` Guillaume Yziquel
2010-01-11 12:18                   ` Gerd Stolpmann
2010-01-11 17:11                     ` Guillaume Yziquel
2010-01-20 14:42                   ` Damien Doligez [this message]

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=1E7D405B-3768-43E5-B304-E32CEBFB56D4@inria.fr \
    --to=damien.doligez@inria.fr \
    --cc=caml-list@yquem.inria.fr \
    --cc=guillaume.yziquel@citycable.ch \
    /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