Re: A list of finalized values ?

From: Xavier Leroy (Xavier.Leroy@trusted-logic.fr)
Date: Fri May 07 1999 - 17:32:20 MET DST


Date: Fri, 7 May 1999 17:32:20 +0200
From: Xavier Leroy <Xavier.Leroy@trusted-logic.fr>
To: "Xavier.Redon" <Xavier.Redon@eudil.fr>
Subject: Re: A list of finalized values ?
In-Reply-To: <199905062036.WAA27067@servnx.priv.eudil.fr>; from Xavier.Redon on Thu, May 06, 1999 at 10:36:29PM +0200

> 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



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:22 MET