I am trying to analyze a basic read operation using ifstream with Procmon.
Part of the code used for read operation where i was trying to read data of 16kb size from a file:
char * buffer = new char[128000];
ifstream fileHandle("file.txt");
fileHandle.read(buffer, 16000);
cout << buffer << endl;
fileHandle.close();
In Procmon there were 4 ReadFile operation with the following details:
Offset: 0, Length: 4,096, Priority: Normal
Offset: 4,096, Length: 4,096
Offset: 8,192, Length: 4,096
Offset: 12,288, Length: 4,096
So does it mean that there were 4 operations of each 4kb size ? and if so why did that happen instead of just having a single ReadFile operation of 16 kb size.