caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Goswin von Brederlow <goswin-v-b@web.de>
To: Lukasz Stafiniak <lukstafi@gmail.com>
Cc: Christoph Bauer <c-bauer-olsbruecken@t-online.de>,
	Basile STARYNKEVITCH <basile@starynkevitch.net>,
	Caml <caml-list@inria.fr>
Subject: Re: [Caml-list] OCaml and Boehm
Date: Tue, 14 Apr 2009 07:25:20 +0200	[thread overview]
Message-ID: <8763h7g62n.fsf@frosties.localdomain> (raw)
In-Reply-To: <4a708d20904130615x120ff744m9211997c5f53b1aa@mail.gmail.com> (Lukasz Stafiniak's message of "Mon, 13 Apr 2009 15:15:25 +0200")

Lukasz Stafiniak <lukstafi@gmail.com> writes:

> On Mon, Apr 13, 2009 at 11:42 AM, Christoph Bauer
> <c-bauer-olsbruecken@t-online.de> wrote:
>> Basile STARYNKEVITCH <basile@starynkevitch.net> writes:
>>
>>> My advice is always to avoid mixing several garbage collection
>>> techniques or implementations inside the same program.
>>>
>>
>> TCL uses refcounted Tcl_Objs. We use these Tcl_Objs in OCaml for a long
>> time. And it works excellent.
>>
>> So I guess,  it's easier to use smart pointers.
>>
> I'll restate my question: is it the same deal with Boehm, or is it
> really more difficult with Boehm? I'm not talking about Boehm starting
> from Caml roots -- this would be too difficult I guess (?), although
> the only way to get back the full performance. Instead, just as with
> smart pointers: every wrapper would register a Boehm-GC root with
> GC_MALLOC_UNCOLLECTABLE, and a finalizer would deregister it with
> GC_FREE. A performance hit, but at least doesn't hit the C++ code.
>
> Thanks in advance.
> £ukasz

That would work. But only allows data to go in one direction. That way
Ocaml can use pointers into the Boehm heap but you can not use
pointers into the ocaml heap.

MfG
        Goswin


  reply	other threads:[~2009-04-14  5:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-10 20:13 Lukasz Stafiniak
2009-04-11  9:46 ` [Caml-list] " Basile STARYNKEVITCH
2009-04-11 10:42   ` Jon Harrop
     [not found]   ` <4a708d20904110511o7d390807r3d29400cf96d6f35@mail.gmail.com>
     [not found]     ` <49E09C2D.4080906@starynkevitch.net>
2009-04-11 14:11       ` Lukasz Stafiniak
2009-04-11 14:27         ` Jon Harrop
2009-04-11 14:40           ` Lukasz Stafiniak
2009-04-11 20:40             ` Jon Harrop
2009-04-11 15:03         ` Basile STARYNKEVITCH
2009-04-11 20:41           ` Jon Harrop
2009-04-13  9:42           ` Christoph Bauer
2009-04-13 13:15             ` Lukasz Stafiniak
2009-04-14  5:25               ` Goswin von Brederlow [this message]
2009-04-12  3:34   ` Goswin von Brederlow
2009-04-12 12:09     ` Lukasz Stafiniak
2009-04-13 17:36 ` Xavier Leroy
2009-04-11 19:17 Ed Keith
2009-04-11 20:36 ` Jon Harrop
2009-04-12  3:25   ` Goswin von Brederlow

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=8763h7g62n.fsf@frosties.localdomain \
    --to=goswin-v-b@web.de \
    --cc=basile@starynkevitch.net \
    --cc=c-bauer-olsbruecken@t-online.de \
    --cc=caml-list@inria.fr \
    --cc=lukstafi@gmail.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).