Hi @Toaster,
Not a silly question at all - Windows memory management in general, and page fault specifically is really a bit of a black art.
Page faults are not only caused by accessing the swap file. They occur anytime a part of a memory mapped file is accessed that isn’t already loaded into memory.
When Windows opens a EXE or DLL (eg: a plugin) it maps the file to memory but doesn’t actually read most of the file. When a mapped memory address that hasn’t been loaded is accessed, the processor trips a page fault exception which Windows picks up on and it goes reads the disk to resolve the page fault after which the processor continues on as if nothing happened.
For example, the first time you bring up File Open dialog you’ll notice Cantabile’s page fault counter spike - that’s because even though the common dialog DLL is mapped into memory, the code that implements that dialog hasn’t yet been loaded - so it page faults and Windows fetches them as needed.
The same process is used for the swap file - when memory is tight and more room is needed, parts of memory will be paged out and the same page fault mechanism used to bring it back in when needed.
Besides these two cases (mapping executable code and the swap file) a Windows program can also explicitly map a file into memory and again the same page fault mechanism will be used to read the disk as necessary.
Here’s the problem though. There’s no easy way* to determine which thread the page faults are happening on. Page faults on the audio thread are bad because any disk I/O on the audio thread has the potential to introduce glitches. Page faults on any other thread are perfectly normal and no need for concern.
* I believe there are ways for a program to read per-thread page fault counters but I’ve not had the time to look into it in enough detail - it’d be great to be able to report an actually useful number here instead of just a hint that something might be amiss
Anyway… I’m not aware of the technical aspects of how Keyscape is implemented but perhaps they’re using memory mapped files. My guess (hope) is that they’re doing all this on a background worker thread leaving the audio thread running page fault free but giving a scary, but otherwise inconsequential page fault reading.
Brad