1 (* Mark objects as 'ancient' so they are taken out of the OCaml heap.
2 * $Id: ancient.ml,v 1.6 2006-10-09 14:43:00 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"
23 external attach : Unix.file_descr -> nativeint -> md = "ancient_attach"
25 external detach : md -> unit = "ancient_detach"
27 external share_info : md -> int -> 'a -> 'a ancient * info
28 = "ancient_share_info"
30 let share md key obj = fst (share_info md key obj)
32 external get : md -> int -> 'a ancient = "ancient_get"
34 let max_key = 1023 (* MMALLOC_KEYS-1. See mmprivate.h *)