code: public static void posixFadviseIfPossible(
        FileDescriptor fd, long offset, long len, int flags)
        throws NativeIOException {
      if (nativeLoaded && fadvisePossible) {
        try {
          posix_fadvise(fd, offset, len, flags);
          InjectionHandler.processEvent(
              InjectionEventCore.NATIVEIO_POSIX_FADVISE, flags);
        } catch (UnsupportedOperationException uoe) {
          LOG.warn("posixFadviseIfPossible() failed", uoe);
          fadvisePossible = false;
        } catch (UnsatisfiedLinkError ule) {
          LOG.warn("posixFadviseIfPossible() failed", ule);
          fadvisePossible = false;
        } catch (NativeIOException nie) {
          LOG.warn("posixFadviseIfPossible() failed", nie);
          throw nie;
        }
      }
    }
docs: Call posix_fadvise on the given file descriptor. See the manpage
  for this syscall for more information. On systems where this
  call is not available, does nothing.
  
  @throws NativeIOException if there is an error with the syscall