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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id BADF27EE4F for ; Wed, 6 Nov 2013 10:20:03 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of jean.krivine@gmail.com) identity=pra; client-ip=74.125.82.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jean.krivine@gmail.com"; x-sender="jean.krivine@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of jean.krivine@gmail.com designates 74.125.82.172 as permitted sender) identity=mailfrom; client-ip=74.125.82.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jean.krivine@gmail.com"; x-sender="jean.krivine@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-we0-f172.google.com) identity=helo; client-ip=74.125.82.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jean.krivine@gmail.com"; x-sender="postmaster@mail-we0-f172.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AioEABgJelJKfVKslGdsb2JhbABahBK/PIEbCBYOAQEBAQcLCwkSKoIlAQEEAUABGx0BAwELBgUEBwM4IQEBEQEFARwGE4duAQMJBqAajFeDCYQoChknDWSJAQEFDIxbgnIHhDADliGBa4xSg0wYKYRSOw X-IPAS-Result: AioEABgJelJKfVKslGdsb2JhbABahBK/PIEbCBYOAQEBAQcLCwkSKoIlAQEEAUABGx0BAwELBgUEBwM4IQEBEQEFARwGE4duAQMJBqAajFeDCYQoChknDWSJAQEFDIxbgnIHhDADliGBa4xSg0wYKYRSOw X-IronPort-AV: E=Sophos;i="4.93,645,1378850400"; d="scan'208";a="41195558" Received: from mail-we0-f172.google.com ([74.125.82.172]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 06 Nov 2013 10:19:27 +0100 Received: by mail-we0-f172.google.com with SMTP id q58so4663816wes.31 for ; Wed, 06 Nov 2013 01:20:03 -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=BDmmNcI/OOrQdK2Ohk+YTBEIB3++7/YPO8eMaxL4Yjo=; b=pt4wtfaNpWMsOUgrQyUEvSSC8jizmlcrgZpoFMonLPMc1F2fC0Tf6HaWJydRMeQoo8 xhqx0a7hlh6a4GWgQ/bGEogRcwW6abCYFzLoolQSdntfDO2/3suVflhqizSrfFDfmMy0 XNAkBo0O+SSzAt5Pk2V6l9SvWLJRJydqnngny/UOdGlnbzFgvvNLgVrdGliAW5DERvlC ScPh39QnZFFzBkQoYlfzaD0cFsx4AFW+kmB0dNSqRAJAS1P2nT3UbsNiUomXyG5WkYCC 47XZdZ9YIF2k8ReUqEc24GoC4pf77CRF6yS4lRjuWhOr2Icw6gSNQrsxSujA9q2YMnXW OOag== X-Received: by 10.180.73.109 with SMTP id k13mr1550240wiv.35.1383729603153; Wed, 06 Nov 2013 01:20:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.87.195 with HTTP; Wed, 6 Nov 2013 01:19:42 -0800 (PST) In-Reply-To: References: From: Jean Krivine Date: Wed, 6 Nov 2013 10:19:42 +0100 Message-ID: To: Lukasz Stafiniak Cc: caml users Content-Type: multipart/alternative; boundary=f46d043891d97614e504ea7ea72f Subject: Re: [Caml-list] out-of-the-heap 'a arrays ? --f46d043891d97614e504ea7ea72f Content-Type: text/plain; charset=ISO-8859-1 It seems that Ancient requires the values that are moved to be immutable full point. I understand that there is a problem if you have pointers from Ancient Heap to Ocaml Heap. But what about pointers that are internal to the Ancient Heap ? Am I talking nonsense? Sorry if I do. J On Tue, Nov 5, 2013 at 8:15 PM, Lukasz Stafiniak wrote: > On Tue, Nov 5, 2013 at 8:06 PM, Lukasz Stafiniak wrote: > >> 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. >> > > Scratch that, totally thoughtless -- of course values are moved around so > you cannot have pointers from Ancient heap to OCaml heap, period. > --f46d043891d97614e504ea7ea72f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
It seems that Ancient requires the values that are moved t= o be immutable full point. I understand that there is a problem if you have= pointers from Ancient Heap to Ocaml Heap. But what about pointers that are= internal to the Ancient Heap ? Am I talking nonsense? Sorry if I do.

J


On Tue, Nov 5, 2013 at 8:15 PM, Lukasz Stafiniak <luksta= fi@gmail.com> wrote:
On T= ue, Nov 5, 2013 at 8:06 PM, Lukasz Stafiniak <lukstafi@gmail.com>= wrote:
On Tue, Nov 5, 2013 at= 6:07 PM, Jean Krivine <jean.krivine@gmail.com> wrote:<= br>

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 = Ancient heap to OCaml heap unless you do weak pointer management (e.g. in t= he finalizer of a value). Otherwise I think you're fine with modifying = Ancient.

Scratch= that, totally thoughtless -- of course values are moved around so you cann= ot have pointers from Ancient heap to OCaml heap, period.

--f46d043891d97614e504ea7ea72f--