Added typed_addr type.
[virt-mem.git] / lib / virt_mem_mmap.mli
index 0294efd..78f9b8c 100644 (file)
@@ -99,6 +99,13 @@ type ('ws,'e,'hm) t
 type addr = int64
 (** Virtual memory addresses (even on 32 bit machines). *)
 
+type 'a typed_addr
+(** Virtual memory addresses with an implicit type, one which we know
+    or believe is pointing at a struct of some known type. *)
+
+external unsafe_addr_of_typed_addr : 'a typed_addr -> addr = "%identity"
+external unsafe_typed_addr_of_addr : addr -> 'a typed_addr = "%identity"
+
 (** {2 Create a memory map, add mappings} *)
 
 val create : unit -> ([`NoWordsize], [`NoEndian], [`NoMappings]) t