X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=lib%2Fvirt_mem_mmap.ml;h=e5f0101fd67c4c9a914311c69c4e8f58c895ecc3;hb=41f56f1ddab7d40bb7b50c0c6f007d7643622128;hp=c323c1a0096c3e7e97252c8a704a1248f77a2066;hpb=b8aef502747b039b20877f99f3d8986b6a9329d2;p=virt-mem.git diff --git a/lib/virt_mem_mmap.ml b/lib/virt_mem_mmap.ml index c323c1a..e5f0101 100644 --- a/lib/virt_mem_mmap.ml +++ b/lib/virt_mem_mmap.ml @@ -618,3 +618,9 @@ let align t addr = let ws = get_wordsize t in let mask = Int64.of_int (bytes_of_wordsize ws - 1) in (addr +^ mask) &^ (Int64.lognot mask) + +(* Typed addresses. *) +type 'a typed_addr + +external unsafe_addr_of_typed_addr : 'a typed_addr -> addr = "%identity" +external unsafe_typed_addr_of_addr : addr -> 'a typed_addr = "%identity"