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=4.1 required=5.0 tests=AWL,DNS_FROM_RFC_POST, DNS_FROM_SECURITYSAGE,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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id DF258BB84 for ; Fri, 14 Nov 2008 16:11:16 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgMDAA8kHUnAXQIngWdsb2JhbACTGz4BARYisSWLLQEDAQOCdYIK X-IronPort-AV: E=Sophos;i="4.33,603,1220220000"; d="scan'208";a="31461578" Received: from concorde.inria.fr ([192.93.2.39]) by mail4-smtp-sop.national.inria.fr with ESMTP; 14 Nov 2008 16:11:16 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id mAEFBFHF003828 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 14 Nov 2008 16:11:16 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtoAAJcjHUnY7zq5kGdsb2JhbACTGz4BAQEBCQkMBxEDsR6LLQEDAQOCdYIK X-IronPort-AV: E=Sophos;i="4.33,603,1220220000"; d="scan'208";a="19963561" Received: from gv-out-0910.google.com ([216.239.58.185]) by mail1-smtp-roc.national.inria.fr with ESMTP; 14 Nov 2008 16:11:15 +0100 Received: by gv-out-0910.google.com with SMTP id s4so263640gve.28 for ; Fri, 14 Nov 2008 07:11:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer:sender; bh=DpEJmjLV7jjdbnxajI+y0inOw8pZuf4LEgMeA70/BaA=; b=C8Kpyz/qRcpZYjEsCwKyqw84LCq2OFjb6nBknMDy3LmW6y6QxPImk4Pr3/ioUrojy5 5eFcg6M/HRSCyQeGXCqC1bSaOuhN4KuaJvImxHp4E7SrZfUwolGTdd0nWGEut3GBtXD0 0yEhyT1q6rJ20FIYDfp78gQesnWBPx3Ds2L1E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer:sender; b=Fzr9E7VDiWdNg/5m2YOl6hjfkg3Mz2XukonemxKsDRSV53E9pUxoYmaYHlCuu4JukV njQHF7T0oUtMAX1f/K364sKeNyLGbB8KOH9UzRAt2jMdZuCQo2qXqHoC6m86UoDedjDN Fbugn+OSJ+g9P5VsPut/hq/pYDhl/3a2k3F3Q= Received: by 10.103.244.10 with SMTP id w10mr355849mur.71.1226675474937; Fri, 14 Nov 2008 07:11:14 -0800 (PST) Received: from ?192.168.1.34? (50-22.76-83.cust.bluewin.ch [83.76.22.50]) by mx.google.com with ESMTPS id y37sm932661mug.13.2008.11.14.07.11.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 14 Nov 2008 07:11:14 -0800 (PST) Message-Id: <15DBBCF2-79EF-4F08-A589-3E1B9B4EECB5@erratique.ch> From: =?ISO-8859-1?Q?Daniel_B=FCnzli?= To: OCaml Mailing List In-Reply-To: <4A8FA99F-D6C3-4D99-AC8D-E17CEE94C88F@erratique.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Re: [Caml-list] Big array with data managed by another value Date: Fri, 14 Nov 2008 16:10:13 +0100 References: <200811141503.43395.toots@rastageeks.org> <4A8FA99F-D6C3-4D99-AC8D-E17CEE94C88F@erratique.ch> X-Mailer: Apple Mail (2.929.2) Sender: =?UTF-8?B?RGFuaWVsIELDvG56bGk=?= X-Miltered: at concorde with ID 491D9513.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; bunzli:01 buenzli:01 bunzli:01 hashing:01 bigarray:01 bigarray:01 pointer:01 caml-list:01 finalization:01 data:02 deallocate:03 let:03 daniel:04 daniel:04 finalise:04 Le 14 nov. 08 =E0 15:42, Daniel B=FCnzli a =E9crit : > I'm not sure I understand what you want to do (what is the original =20= > value ?). I think I understood now, the original value was the custom block. If you were using the custom block only for finalization issues (not =20 serialization, hashing etc.) then one solution would be to replace =20 your custom block type by the bigarray itself. An register the =20 bigarray with Gc.finalise to deallocate the C pointer at the =20 appropriate time. Then you have type t =3D bigarray let to_bigarray x =3D x and no problems. Best, Daniel