public void advise ( long position , long length ) throws IOException { final long ap = address + position ; final long a = ( ap ) / PAGE_SIZE * PAGE_SIZE ; final long l = Math . min ( length + ( ap - a ) , address + memory . length ( ) - ap ) ; final int err = madvise ( a , l ) ; if ( err != 0 ) { throw new IOException ( "madvise failed with error code: " + err ) ; } }
this is not particularly useful the syscall takes forever