From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 6F5F57EE25 for ; Tue, 5 Nov 2013 20:07:03 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of lukstafi@gmail.com) identity=pra; client-ip=209.85.212.181; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="lukstafi@gmail.com"; x-sender="lukstafi@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of lukstafi@gmail.com designates 209.85.212.181 as permitted sender) identity=mailfrom; client-ip=209.85.212.181; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="lukstafi@gmail.com"; x-sender="lukstafi@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wi0-f181.google.com) identity=helo; client-ip=209.85.212.181; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="lukstafi@gmail.com"; x-sender="postmaster@mail-wi0-f181.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ag8DALBAeVLRVdS1lGdsb2JhbABZhBK/OIEkCBYOAQEBAQcLCwkSKoIcCQEBBAFAARsdAQMMBgUDAQc7IQEBEQEFARwGE4duAQMJBqBAjFeDCYQvChknDWSJAQEFDIxbgnIHhC8Dlh+Ba4xSg0sYKYRSOw X-IPAS-Result: Ag8DALBAeVLRVdS1lGdsb2JhbABZhBK/OIEkCBYOAQEBAQcLCwkSKoIcCQEBBAFAARsdAQMMBgUDAQc7IQEBEQEFARwGE4duAQMJBqBAjFeDCYQvChknDWSJAQEFDIxbgnIHhC8Dlh+Ba4xSg0sYKYRSOw X-IronPort-AV: E=Sophos;i="4.93,640,1378850400"; d="scan'208";a="33882573" Received: from mail-wi0-f181.google.com ([209.85.212.181]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 05 Nov 2013 20:07:02 +0100 Received: by mail-wi0-f181.google.com with SMTP id ex4so2588578wid.8 for ; Tue, 05 Nov 2013 11:07:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=VVq3zWPMIGXz9NDzqSUU2c3+y9o86vnaLt5nDvKbKXo=; b=AjIv7HwROeR6Kg2n/weWRmlD5iEVoIHz8w8XicE5wdPfpY7lsEMpk4/uZRxsmdsm3R d7ajKppLqmB2yPAbzTSvKpEY9myj5RBMgeYHU6WyHqvHdvQoLu58vGG7zV9Q53mYXLls XOqPUCJylVBnxWDUg1iII5/4fb8adhJLqHRz34IkhsxsW1ie6Vttgn8qrliPaG+gfZz2 BWYVfPbBW5ITaAwutdM0WzTe7QPMGqmbBJLzFxLjoutqav3gE5hHA7ZKxke2U12d3n/a mdvvNz39sVs3tbyZoqdnDoHweyMb9Pc3VnKcTSiAV9Bc9QC24vMF6jvn/QbjudHMgVJ8 BG6g== X-Received: by 10.194.21.225 with SMTP id y1mr2755271wje.60.1383678422048; Tue, 05 Nov 2013 11:07:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.227.97.195 with HTTP; Tue, 5 Nov 2013 11:06:41 -0800 (PST) In-Reply-To: References: From: Lukasz Stafiniak Date: Tue, 5 Nov 2013 20:06:41 +0100 Message-ID: To: Jean Krivine Cc: caml users Content-Type: multipart/alternative; boundary=047d7b5d98abd469be04ea72bc9d Subject: Re: [Caml-list] out-of-the-heap 'a arrays ? --047d7b5d98abd469be04ea72bc9d Content-Type: text/plain; charset=ISO-8859-1 On Tue, Nov 5, 2013 at 6:07 PM, Jean Krivine wrote: > > As far as I understand there is a module Ancient which I can use to tell > the GC to ignore my array but, if I understand well, it would only work if > I use my array in a read only fashion. > You cannot have pointers from Ancient heap to OCaml heap unless you do weak pointer management (e.g. in the finalizer of a value). Otherwise I think you're fine with modifying Ancient. --047d7b5d98abd469be04ea72bc9d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Tue, Nov 5, 2013 at 6:07 PM, Jean Krivine <jean.k= rivine@gmail.com> wrote:

As far as I unders= tand there is a module Ancient which I can use to tell the GC to ignore my = array but, if I understand well, it would only work if I use my array in a = read only fashion.

You cannot have pointers from Ancien= t heap to OCaml heap unless you do weak pointer management (e.g. in the fin= alizer of a value). Otherwise I think you're fine with modifying Ancien= t.
--047d7b5d98abd469be04ea72bc9d--