1 (* Mark objects as 'ancient' so they are taken out of the OCaml heap.
2 * $Id: ancient.ml,v 1.7 2006-10-13 12:28:20 rich Exp $
11 external mark_info : 'a -> 'a ancient * info = "ancient_mark_info"
13 let mark obj = fst (mark_info obj)
15 external follow : 'a ancient -> 'a = "ancient_follow"
17 external delete : 'a ancient -> unit = "ancient_delete"
19 external is_ancient : 'a -> bool = "ancient_is_ancient"
21 external address_of : 'a -> nativeint = "ancient_address_of"
25 external attach : Unix.file_descr -> nativeint -> md = "ancient_attach"
27 external detach : md -> unit = "ancient_detach"
29 external share_info : md -> int -> 'a -> 'a ancient * info
30 = "ancient_share_info"
32 let share md key obj = fst (share_info md key obj)
34 external get : md -> int -> 'a ancient = "ancient_get"