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 170AA7EE25 for ; Tue, 5 Nov 2013 20:16:07 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of lukstafi@gmail.com) identity=pra; client-ip=74.125.82.169; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="lukstafi@gmail.com"; x-sender="lukstafi@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of lukstafi@gmail.com designates 74.125.82.169 as permitted sender) identity=mailfrom; client-ip=74.125.82.169; receiver=mail2-smtp-roc.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 (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-we0-f169.google.com) identity=helo; client-ip=74.125.82.169; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="lukstafi@gmail.com"; x-sender="postmaster@mail-we0-f169.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgcCAExDeVJKfVKpm2dsb2JhbABZhBK/OIEkCBYOAQEBAQEGCwsJFCiCJQEBBAFAARsdAQMBCwYFBAEGOyEBAREBBQEcBhOHbgEDCQagMIxXgwmELwoZJw1kiQEBBQyMW4JyB4QvA5YfgWuMUoNLGCmEUjs X-IPAS-Result: AgcCAExDeVJKfVKpm2dsb2JhbABZhBK/OIEkCBYOAQEBAQEGCwsJFCiCJQEBBAFAARsdAQMBCwYFBAEGOyEBAREBBQEcBhOHbgEDCQagMIxXgwmELwoZJw1kiQEBBQyMW4JyB4QvA5YfgWuMUoNLGCmEUjs X-IronPort-AV: E=Sophos;i="4.93,640,1378850400"; d="scan'208";a="41089889" Received: from mail-we0-f169.google.com ([74.125.82.169]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 05 Nov 2013 20:15:32 +0100 Received: by mail-we0-f169.google.com with SMTP id q58so4004888wes.0 for ; Tue, 05 Nov 2013 11:16:06 -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=zEk1JXpfPFkBRg8fF1w3Mso1RPQ+0vVzxQQg86+nj58=; b=Fp6UcVlv1We6whnP2YQaZHwtKlicSH5+67jkIIE65SKqmuNfGlS3rafYMh89BfpD8w OoLvxuTObN4fJ5YsK4F+6XvxY31/VcWX7DV/jGXpiXa0OYYNGKVzZj7KNWkIvYoUtBS+ ZeOvh00WPY4ZWIzJCHp5h2e9KebmCtUOKBBek+r8ujOTlTzBkaLx2/Xr4tOjJ8o+0Tp6 VO57kSmqtiMUETTSqc9zLfjHnno9dtKqG47TeMKGTeuixOnyroDWQVZhGFxkaLXUxK9a zcxh+LgT2ll8hQJuTvY4D6iJSMVmce4XK5Dg8vgkGrTSDBBxwZzF6g+a/YJWaD6b71d4 HIMw== X-Received: by 10.194.178.166 with SMTP id cz6mr3229923wjc.53.1383678966087; Tue, 05 Nov 2013 11:16:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.227.97.195 with HTTP; Tue, 5 Nov 2013 11:15:46 -0800 (PST) In-Reply-To: References: From: Lukasz Stafiniak Date: Tue, 5 Nov 2013 20:15:46 +0100 Message-ID: To: Jean Krivine Cc: caml users Content-Type: multipart/alternative; boundary=089e013d1a0c41cef504ea72ddf6 Subject: Re: [Caml-list] out-of-the-heap 'a arrays ? --089e013d1a0c41cef504ea72ddf6 Content-Type: text/plain; charset=ISO-8859-1 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. --089e013d1a0c41cef504ea72ddf6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Tue, Nov 5, 2013 at 8:06 PM, Lukasz Stafiniak <luksta= fi@gmail.com> wrote:
On Tue, N= ov 5, 2013 at 6:07 PM, Jean Krivine <jean.krivine@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 = 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, total= ly thoughtless -- of course values are moved around so you cannot have poin= ters from Ancient heap to OCaml heap, period.
--089e013d1a0c41cef504ea72ddf6--