Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

After reading that I wondered what happens on Linux if you actually call posix_madvise(POSIX_MADV_DONTNEED). The answer, from glibc:

    /* We have one problem: the kernel's MADV_DONTNEED does not
       correspond to POSIX's POSIX_MADV_DONTNEED.  The former simply
       discards changes made to the memory without writing it back to
       disk, if this would be necessary.  The POSIX behavior does not
       allow this.  There is no functionality mapping the POSIX behavior
       so far so we ignore that advice for now.  */
    if (advice == POSIX_MADV_DONTNEED)
      return 0;


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: