From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=2.0 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id C2A33BBC4 for ; Mon, 13 Apr 2009 15:15:31 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkADACvY4knRVdq0kGdsb2JhbACVdj8BAQEBCQkMBxEDpRiBCY1LAQMBA4N5Bg X-IronPort-AV: E=Sophos;i="4.40,180,1238968800"; d="scan'208";a="26162363" Received: from mail-bw0-f180.google.com ([209.85.218.180]) by mail3-smtp-sop.national.inria.fr with ESMTP; 13 Apr 2009 15:15:26 +0200 Received: by bwz28 with SMTP id 28so1962128bwz.9 for ; Mon, 13 Apr 2009 06:15:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ztlgdLF9BuT0f4E6zQiuVp4PEc5A4z/PsJcLY0b/WLw=; b=BjbLneEhWG26EEUuzW6Z3jrF5ZcJPXAWe46atDn7MjM1hAUs76dbub/WUYVuZJPZcX MKQitbSXVe9TMk6o3e+loOOzgnufakaV0/IbCOc9WxEHgi4N0YMMcK6Q6S87VPWZp90H 5N/PT4AbbQ7hcbyLqdsrIr2IpchwMrGjn4Jyw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=eiBSCUIL+3/WZgtaerx5VK2f/315xnqytXjA6OReyWiwhQxqlrSSOWeXnEIgRbSEQl T2S4IBxP1fq3v+PNKdwCjGgRVdwS/vB1RCfcb0n2I5cdxKaq5iEWAQHcPFcApvXjIkvk bkj5gvBgAldvnXp5S+TZChMikT0bidUkqN5zY= MIME-Version: 1.0 Received: by 10.223.117.14 with SMTP id o14mr1726997faq.21.1239628526049; Mon, 13 Apr 2009 06:15:26 -0700 (PDT) In-Reply-To: <87bpr0khzm.fsf@christoph-bauer.net> References: <4a708d20904101313s49ef3b75m45202b6bda800b77@mail.gmail.com> <49E066E5.8060107@starynkevitch.net> <4a708d20904110511o7d390807r3d29400cf96d6f35@mail.gmail.com> <49E09C2D.4080906@starynkevitch.net> <4a708d20904110711i199ef805h611a04d823c8fb51@mail.gmail.com> <49E0B15C.6080208@starynkevitch.net> <87bpr0khzm.fsf@christoph-bauer.net> Date: Mon, 13 Apr 2009 15:15:25 +0200 Message-ID: <4a708d20904130615x120ff744m9211997c5f53b1aa@mail.gmail.com> Subject: Re: [Caml-list] OCaml and Boehm From: Lukasz Stafiniak To: Christoph Bauer Cc: Basile STARYNKEVITCH , Caml Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; ocaml:01 boehm:01 lukasz:01 basile:01 basile:01 objs:01 objs:01 ocaml:01 pointers:01 boehm:01 pointers:01 malloc:01 finalizer:01 2009:98 garbage:01 On Mon, Apr 13, 2009 at 11:42 AM, Christoph Bauer wrote: > Basile STARYNKEVITCH 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, =A0it'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. =A3ukasz