Caching in mmap
Posted
by myahya
on Stack Overflow
See other posts from Stack Overflow
or by myahya
Published on 2010-04-23T07:33:19Z
Indexed on
2010/04/23
7:53 UTC
Read the original article
Hit count: 353
I am using mmap call to read from a very big file using simple pointer arithmetic in C++. The problem is that when I read small chunks of data (in the order of KBs) multiple times, each read take the same amount of time as the previous one. How can I know if the disk is being accessed to fulfill my request or whether the request is being fulfilled from main memory (page cache) in calls after the first one.
© Stack Overflow or respective owner