caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Christoph Höger" <christoph.hoeger@tu-berlin.de>
To: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] Garbage collector woes
Date: Mon, 4 Jul 2016 19:06:11 +0200	[thread overview]
Message-ID: <8ff1d18d-581a-0269-fb0d-5bc70a1a9acd@tu-berlin.de> (raw)
In-Reply-To: <CAAxsn=HE-DsnuFDvsm7cK+m3d8i96kYG=Dhe6rohvn5DUFt+Fg@mail.gmail.com>

Am 04.07.2016 um 18:21 schrieb Jeremy Yallop:
> I'm guessing that 'desc' points to a block and N, MFIT and ICONV are
> field accessors.

That is correct. N, MFIT and ICONV are macros defined as Field(.., ..).

> If so, you need to register 'desc' as a root here, since
> caml_copy_double or caml_ba_alloc_dims could trigger a gc, moving desc
> before it's next used.

By registering as a root you mean to also declare it via CAMLlocal? Is
this necessary/appropriate, since &desc is already a registered global root.

Do you have any clue how that moving of desc could trigger the
overwriting of x and cond?

> It's probably also better not to call your exported function 'iconv',
> since there's a POSIX function of that name.

Good to know. I am merely implementing an API here, so these names
aren't mine ;).

-- 
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

  reply	other threads:[~2016-07-04 17:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-04 16:04 Christoph Höger
2016-07-04 16:21 ` Jeremy Yallop
2016-07-04 17:06   ` Christoph Höger [this message]
2016-07-04 17:44     ` Jeremy Yallop

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=8ff1d18d-581a-0269-fb0d-5bc70a1a9acd@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;
as well as URLs for NNTP newsgroup(s).