caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Jonathan Bryant" <jtbryant@valdosta.edu>
To: "Joel Stanley" <jstanley@galois.com>
Cc: "Caml Mailing List" <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Using the C FFI to wrap an OCaml library
Date: Fri, 8 Feb 2008 23:07:57 -0500	[thread overview]
Message-ID: <b256a4c50802082007p4e285226jbf8183b89d33bb48@mail.gmail.com> (raw)
In-Reply-To: <20080208.135334.126881887.jstanley@galois.com>

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

On Fri, Feb 8, 2008 at 4:53 PM, Joel Stanley <jstanley@galois.com> wrote:

>
> Well, much of my curiosity stems from the fact that I know little about
> the OCaml runtime or how the OCaml GC is invoked.  If the GC can ever be
> invoked in its own thread, it seems like while the values (of type
> 'value') are being passed back on the stack (but *after* the
> caml__local_roots pointer has been reverted) there could be problems?
>
> If this can't ever happen, great! Why not?
>
>
I believe GC cycles can only be kicked off by an allocation since this is
the only time that any memory would need to be recovered, so this could
never happen.  As I understand it, any GC cycles would start and complete
within the call to the allocation function.  Multi threaded code might be an
exception, because there could be a context switch and a GC triggered by
another thread at just the wrong moment.

--Jonathan

[-- Attachment #2: Type: text/html, Size: 1262 bytes --]

  reply	other threads:[~2008-02-09  4:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-06 23:54 Joel Stanley
2008-02-07 22:26 ` [Caml-list] " Damien Doligez
2008-02-08 21:53   ` Joel Stanley
2008-02-09  4:07     ` Jonathan Bryant [this message]
2008-02-12 21:58       ` 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=b256a4c50802082007p4e285226jbf8183b89d33bb48@mail.gmail.com \
    --to=jtbryant@valdosta.edu \
    --cc=caml-list@yquem.inria.fr \
    --cc=jstanley@galois.com \
    /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).