Remove the limitation on the number of keys.
[ocaml-ancient.git] / ancient.ml
index 640e0d4..75c3039 100644 (file)
@@ -1,5 +1,5 @@
 (* Mark objects as 'ancient' so they are taken out of the OCaml heap.
- * $Id: ancient.ml,v 1.6 2006-10-09 14:43:00 rich Exp $
+ * $Id: ancient.ml,v 1.7 2006-10-13 12:28:20 rich Exp $
  *)
 
 type 'a ancient
@@ -18,6 +18,8 @@ external delete : 'a ancient -> unit = "ancient_delete"
 
 external is_ancient : 'a -> bool = "ancient_is_ancient"
 
+external address_of : 'a -> nativeint = "ancient_address_of"
+
 type md
 
 external attach : Unix.file_descr -> nativeint -> md = "ancient_attach"
@@ -30,5 +32,3 @@ external share_info : md -> int -> 'a -> 'a ancient * info
 let share md key obj = fst (share_info md key obj)
 
 external get : md -> int -> 'a ancient = "ancient_get"
-
-let max_key = 1023 (* MMALLOC_KEYS-1.  See mmprivate.h *)