Date: Mon, 19 Apr 1999 16:42:30 +0200
From: Patrick Goldbronn - SYSCO <patrick.goldbronn@cea.fr>
To: caml-list@inria.fr
Subject: trouble with C pointers and GC
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 # ######################
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:22 MET