-val share : Unix.file_descr -> 'a -> 'a ancient
- (** [share fd obj] does the same as {!Ancient.mark} except
+type md
+ (** Memory descriptor handle. *)
+
+val attach : Unix.file_descr -> md
+ (** [attach fd] attaches to a new or existing file which may contain
+ * shared objects.
+ *
+ * Initially [fd] should be a read/writable, zero-length file
+ * (see {!Unix.openfile}). One or more objects can then be
+ * shared in this file using {!Unix.share}.
+ *)
+
+val detach : md -> unit
+ (** [detach md] detaches from an existing file, and closes it.
+ *)
+
+val share : md -> int -> 'a -> 'a ancient
+ (** [share md key obj] does the same as {!Ancient.mark} except