Browse thread
trouble with C pointers and GC
- Patrick Goldbronn - SYSCO
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Patrick Goldbronn - SYSCO <patrick.goldbronn@c...> |
| 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 # ######################