public static Pointer mmap ( long len , int prot , int flags , int fildes , long off ) throws IOException { // we don't really have a need to change the recommended pointer. Pointer addr = new Pointer ( 0 ) ; Pointer result = Delegate . mmap ( addr , new NativeLong ( len ) , prot , flags , fildes , new NativeLong ( off ) ) ; if ( Pointer . nativeValue ( result ) == - 1 ) { if ( logger . isDebugEnabled ( ) ) logger . debug ( errno . strerror ( ) ) ; throw new IOException ( "mmap failed: " + errno . strerror ( ) ) ; } return result ; }
Map the given region of the given file descriptor into memory . Returns a Pointer to the newly mapped memory throws an IOException on error .