Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Michael Hicks <mwh@cs.umd.edu>
To: caml-list@inria.fr
Subject: [Caml-list] Scanning objects outside the OCaml heap
Date: Mon, 6 Jul 2015 15:21:11 -0700	[thread overview]
Message-ID: <CAFb7wiWQe21EXdeGXjZk+iKKsXYDDY43YET3AQ8oY19xEWQaEw@mail.gmail.com> (raw)

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

From what I have found on-line (Chap 19 of the OCaml manual, and Chap 20 of
Real-World OCaml), it seems that memory outside of the OCaml heap, but
pointed to by it, is not scanned by the GC.

Does anyone know: Is there any way to make outside memory scannable by the
GC?

The reason I ask:

I'm interested in implementing a custom memory management strategy that I
can prove is safe in a language I will compile to OCaml. I'm thinking I'd
like to allocate freeable memory outside the OCaml heap, but as OCaml
values. Since these values can point to OCaml heap-resident data, they need
to be scanned. But I don't want to have to explicitly register/deregister
them as roots to the GC, or track all mutations to the values, if I can
help it. Rather, having a single "persistent root" to my memory area, for
purposes of scanning, would be ideal.

Thanks in advance for any help,

-Mike

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

             reply	other threads:[~2015-07-06 22:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06 22:21 Michael Hicks [this message]
2015-07-07  0:32 ` Pierre Chambart
2015-07-13  3:20 ` Oleg

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=CAFb7wiWQe21EXdeGXjZk+iKKsXYDDY43YET3AQ8oY19xEWQaEw@mail.gmail.com \
    --to=mwh@cs.umd.edu \
    --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