caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Vitaly Lugovsky <vsl@ontil.ihep.su>
Cc: caml-list@inria.fr
Subject: Re: GC question
Date: Tue, 23 Jan 2001 09:29:41 +0100	[thread overview]
Message-ID: <20010123092941.A12784@pauillac.inria.fr> (raw)
In-Reply-To: <Pine.LNX.4.10.10101130513340.11672-100000@ontil.ihep.su>; from vsl@ontil.ihep.su on Sat, Jan 13, 2001 at 05:16:08AM +0300

>  What shall I do, if I want to store a pointer to a caml value
> in a structure outside the caml heap? Is there any GC hints for it?

You need to tell the GC the address (outside the heap) where the Caml
value is stored, using register_global_root().  

When the external data structure is no longer relevant, or is about to
be freed, call remove_global_root() to tell the GC that the global
root is no longer there, thus allowing the GC to reclaim the
corresponding Caml data structure.

- Xavier Leroy



  reply	other threads:[~2001-01-23 21:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-13  2:16 Vitaly Lugovsky
2001-01-23  8:29 ` Xavier Leroy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-10-24 17:53 MATTHEW HAMMER
2005-07-05  7:59 dmitry grebeniuk
1999-12-23 16:54 Gc Question Damien Doligez
1999-12-12 23:59 skaller

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=20010123092941.A12784@pauillac.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=vsl@ontil.ihep.su \
    /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).