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 TAA31828 for caml-redistribution; Mon, 19 Apr 1999 19:58:18 +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 QAA12042 for ; Mon, 19 Apr 1999 16:45:50 +0200 (MET DST) Received: from nenuphar.saclay.cea.fr (nenuphar.saclay.cea.fr [132.166.192.7]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id QAA10406 for ; Mon, 19 Apr 1999 16:45:48 +0200 (MET DST) Received: from orion.serma.cea.fr (orion.serma.cea.fr [132.166.151.161]) by nenuphar.saclay.cea.fr (8.9.1a/8.9.1/CEAnet-relay-5.0.D20) with ESMTP id QAA04279 for ; Mon, 19 Apr 1999 16:47:21 +0200 (MET DST) Received: from cea.fr (localhost [127.0.0.1]) by orion.serma.cea.fr (8.8.7/8.8.7) with ESMTP id QAA05907 for ; Mon, 19 Apr 1999 16:42:30 +0200 Sender: weis Message-ID: <371B40D6.1760563E@cea.fr> Date: Mon, 19 Apr 1999 16:42:30 +0200 From: Patrick Goldbronn - SYSCO Organization: CEA-DRN/DMT/SYSCO X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.1 i686) MIME-Version: 1.0 To: caml-list@inria.fr Subject: trouble with C pointers and GC Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit Hello, I have some trouble to return a structure with pointers outside the heap ! I allocate two C pointer : adr1 = (double *) calloc(nb1,sizeof(double)); adr2 = (int *) calloc(nb2,sizeof(int)); and I want to put it in a value with Final_tag : result = alloc_final( n , free_function , nb_elm*2 , 1 ) ; I don't know what is the value of n (n words) : A pointer value represent 1 word or 2 ? How can I store the pointers adr1 and adr2 in value result and how can I retrieve them (with Store_field and Field ?) ? Thank you for your assistance. -- ###################### # Patrick GOLDBRONN # # CEA- DRN/DMT/SYSCO # ######################