mmap(2) questions, reads not caching

2003-10-19 Thread Sean Hamilton
I have some code resembling: FILE * f = fopen (filename, rb); mmap (NULL, st.st_size, PROT_READ, MAP_PRIVATE, fileno (f), 0); I've found that reads are not brought into disk cache. Successive reads on the same file once again read from disk. If I cat the file to /dev/null, then the mmap(2) does

mmap(2) questions, reads not caching

2003-09-08 Thread Sean Hamilton
I have some code resembling: FILE * f = fopen (filename, rb); mmap (NULL, st.st_size, PROT_READ, MAP_PRIVATE, fileno (f), 0); I've found that reads are not brought into disk cache. Successive reads on the same file once again read from disk. If I cat the file to /dev/null, then the mmap(2) does

Re: mmap(2) questions, reads not caching

2003-09-08 Thread Dan Nelson
In the last episode (Sep 08), Sean Hamilton said: I have some code resembling: FILE * f = fopen (filename, rb); mmap (NULL, st.st_size, PROT_READ, MAP_PRIVATE, fileno (f), 0); I've found that reads are not brought into disk cache. Successive reads on the same file once again read from