Reply To: System file cache

Home Forums Discussions General Discussion System file cache Reply To: System file cache

#6260

Vadim Smirnov
Moderator

You can’t affect cache manager behavior from user mode, however there is another way to do what you want. You can map each of 2000 files into the process memory (CreateFileMapping and MapViewOfFile), 20 megs should easily fit your process address space. Then read one byte from each page (each 4K) of each mapping, this will force system to bring all files into memory.

However, I would not force system to fetch all data from disk at once, but better postpone each fetch operation when it is really necessary.