Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Christoph Höger" <christoph.hoeger@tu-berlin.de>
To: caml users <caml-list@inria.fr>
Subject: [Caml-list] Reason for static data in caml runtime
Date: Fri, 6 Jan 2017 09:10:59 +0100	[thread overview]
Message-ID: <28b00f9b-d36c-b710-ade1-f250ad4f7c5e@tu-berlin.de> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1142 bytes --]

Dear all,

after investigating the interaction of native code and the runtime
environment (in particular the GC), I am puzzled about the static
storage of some data (e.g. the young_pointer, global roots etc):

* if I am not mistaken, each function obtains the young pointer in a
register (%rax on x86)

* the same value is stored globally in a variable allocated by the
executable

* several other variables are allocated that way

I wonder why this is necessary. If the generated code uses one register
anyway, why not put a pointer to the necessary global data structures in
there as well? (say, in the first element of the minor heap).

I am probably missing something here, but at first glance this strategy
prevents concurrent ocaml execution in one process and at the same time
it seems to be fixable, right?

thanks for any comments,

Christoph
-- 
Christoph Höger

Technische Universität Berlin
Fakultät IV - Elektrotechnik und Informatik
Übersetzerbau und Programmiersprachen

Sekr. TEL12-2, Ernst-Reuter-Platz 7, 10587 Berlin

Tel.: +49 (30) 314-24890
E-Mail: christoph.hoeger@tu-berlin.de


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

             reply	other threads:[~2017-01-06  8:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-06  8:10 Christoph Höger [this message]
2017-01-06  8:36 ` Nicolás Ojeda Bär
2017-01-06 11:53   ` Gabriel Scherer

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=28b00f9b-d36c-b710-ade1-f250ad4f7c5e@tu-berlin.de \
    --to=christoph.hoeger@tu-berlin.de \
    --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