From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA22258 for caml-redistribution; Fri, 7 May 1999 19:31:51 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA02690 for ; Fri, 7 May 1999 17:34:06 +0200 (MET DST) Received: from carabosse.oleane.net (carabosse.oleane.net [194.2.28.5]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id RAA01186 for ; Fri, 7 May 1999 17:34:05 +0200 (MET DST) Received: from tom.oleane.net (smtp.dial.oleane.com [194.2.0.54]) by carabosse.oleane.net with ESMTP id RAA26549; Fri, 7 May 1999 17:34:01 +0200 Received: from hoedic.trusted-logic.fr (dyn-1-1-160.Def.dialup.oleane.fr [195.25.5.160]) by tom.oleane.net (8.8.8/8.8.8) with ESMTP id RAA05154; Fri, 7 May 1999 17:34:00 +0200 Received: (from xleroy@localhost) by hoedic.trusted-logic.fr (8.8.7/8.8.7) id RAA08040; Fri, 7 May 1999 17:32:20 +0200 Date: Fri, 7 May 1999 17:32:20 +0200 From: Xavier Leroy To: "Xavier.Redon" Cc: caml-list@inria.fr Subject: Re: A list of finalized values ? Message-ID: <19990507173220.J7966@hoedic.trusted-logic.fr> References: <199905062036.WAA27067@servnx.priv.eudil.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4us In-Reply-To: <199905062036.WAA27067@servnx.priv.eudil.fr>; from Xavier.Redon on Thu, May 06, 1999 at 10:36:29PM +0200 Sender: weis > I try to build a list of finalized values in C and use it under Caml. > If I use alloc_final with used=0 and max=1, no problem, that works. I don't think it does. Finalized blocks must not contain any pointers into the Caml heap. Your sample code seems to do this. Rather than finalize the cons cells of the list, you should build a regular list and wrap each element of the list in a finalized block. Again, this assumes that the list elements are not Caml pointers but e.g. pointers into the C heap. Hope this helps, - Xavier Leroy