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 558527EE25 for ; Wed, 6 Nov 2013 15:19:54 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of rich@annexia.org) identity=pra; client-ip=80.68.91.176; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="rich@annexia.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of rich@annexia.org designates 80.68.91.176 as permitted sender) identity=mailfrom; client-ip=80.68.91.176; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="rich@annexia.org"; 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@furbychan.cocan.org) identity=helo; client-ip=80.68.91.176; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="postmaster@furbychan.cocan.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkgFAKJPelJQRFuw/2dsb2JhbABagweDPBO8eoEkFnSCJQEBBTo/EAsYCRMSDwUoIYgYAb8OhhWJRAeDIIEQA5gLkguDJjw X-IPAS-Result: AkgFAKJPelJQRFuw/2dsb2JhbABagweDPBO8eoEkFnSCJQEBBTo/EAsYCRMSDwUoIYgYAb8OhhWJRAeDIIEQA5gLkguDJjw X-IronPort-AV: E=Sophos;i="4.93,647,1378850400"; d="scan'208";a="41262013" Received: from furbychan.cocan.org ([80.68.91.176]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 06 Nov 2013 15:19:06 +0100 Received: from rich by furbychan.cocan.org with local (Exim 4.80) (envelope-from ) id 1Ve3xN-0002uI-TH; Wed, 06 Nov 2013 14:19:41 +0000 Date: Wed, 6 Nov 2013 14:19:41 +0000 From: "Richard W.M. Jones" To: Jean Krivine Cc: caml users Message-ID: <20131106141941.GB10737@annexia.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [Caml-list] out-of-the-heap 'a arrays ? On Tue, Nov 05, 2013 at 06:07:42PM +0100, 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. I don't think you're reading this right. You can mutate the ancient heap data (eg. if it's an array of ints, updating an int), you just have to be very careful not to create a pointer from ancient data to the OCaml heap. It's probably worth reviewing how ocaml-ancient is implemented. It's not that hard to understand. Rich. -- Richard Jones Red Hat