madvise(ptr, len, MADV_SEQUENTIAL)

Jason Rutherglen jason.rutherglen at gmail.com
Thu Jun 18 15:32:58 PDT 2009


Hmm... So the list at the bottom of this page looks accurate?
http://www.gnu.org/software/hello/manual/gnulib/posix_005ffadvise.html

If it is, then posix_fadvise works on Linux only?

Perhaps madvise will be better then (judging by the much smaller unsupported
list)?  It seems to run on most platforms:
http://www.gnu.org/software/hello/manual/gnulib/madvise.html

On Wed, Jun 17, 2009 at 2:19 AM, Alan Bateman <Alan.Bateman at sun.com> wrote:

> Jason Rutherglen wrote:
>
>> Alan,
>>
>> Do you think something like FileDescriptor.setAdvise (mirroring
>> posix_fadvise) makes sense?
>>
>> -J
>>
> Something like a posix_fadvise would be more appropriate for FileChannel or
> maybe as a usage hint when opening the file (the new APIs for opening files
> are extensible to allow for additional options in the future or even
> implementation specific options). I don't think we've had much interest in
> doing this, maybe because it would be a no-op on many operating systems.
>
> -Alan.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-discuss/attachments/20090618/ef26bd71/attachment.html 


More information about the nio-discuss mailing list