X-Git-Url: http://git.annexia.org/?p=virt-mem.git;a=blobdiff_plain;f=lib%2Fvirt_mem_mmap.mli;h=0294efd94865999ad6ec93cb16612c86d201c96e;hp=50650b4192410b68f38d94f905b11593344c2d91;hb=b8aef502747b039b20877f99f3d8986b6a9329d2;hpb=f515867f07955345c801e13e6667485667cfc199 diff --git a/lib/virt_mem_mmap.mli b/lib/virt_mem_mmap.mli index 50650b4..0294efd 100644 --- a/lib/virt_mem_mmap.mli +++ b/lib/virt_mem_mmap.mli @@ -87,8 +87,14 @@ type ('ws,'e,'hm) t initializing certain parts of the memory map. If you are not familiar with phantom types, you can just ignore them. - See also: - [http://camltastic.blogspot.com/2008/05/phantom-types.html] *) + See also + {{:http://camltastic.blogspot.com/2008/05/phantom-types.html}this + posting about the phantom types used in virt-mem}. + + The memory map structure is an example of a + {{:http://en.wikipedia.org/wiki/Purely_functional}persistent + data structure}. +*) type addr = int64 (** Virtual memory addresses (even on 32 bit machines). *) @@ -215,9 +221,13 @@ val is_C_identifier : ('ws, 'e, [`HasMapping]) t -> addr -> bool (** Return true or false if the address contains a NUL-terminated C identifier. *) -val is_mapped : ('ws, 'e, [`HasMapping]) t -> addr -> bool +val is_mapped : ('ws, 'e, 'hm) t -> addr -> bool (** Return true if the single address [addr] is mapped. *) +val is_mapped_range : ('ws, 'e, 'hm) t -> addr -> int -> bool +(** Return true if all addresses in the range [addr] to [addr+size-1] + are mapped. *) + val follow_pointer : ([`Wordsize], [`Endian], [`HasMapping]) t -> addr -> addr (** Follow (dereference) the pointer at [addr] and return the address pointed to. *)