"mterrisse" <> wrote in message
news:2b11c987-030a-4f96-9269-...
> Hello,
>
> I am using Windows 7 64-bit but I develop a 32-bit application. When
> It is running, the Windows task manager reports millions of page
> faults and I am trying to track them to improve performance.
> The number of page faults reported for the same program using a 32-bit
> version of Windows is not so big, so it has to do with WOW64.
>
> I try to focus on faults directly linked to my code but most of the
> page faults come from Windows Api like ReadFile or SysAllocStringLen,
> and I cannot change anything to that.
> Is it well known that Win32 APIs can generate a lot of page faults, or
> is there anything I can do to limit that ?
>
> Note that I have 16 GB RAM installed on the machine, that is large,
> and a test program I wrote can generate thousands of pages faults
> immediately while it comsumes less than 1 MB.
>
> Regards,
>
> Michel
Are you sure these are real faults? Every time your program asks windows to
look for some data and it is not already in RAM it will load it and the
failure to find it first time is recorded as a fault. The first time you
program executes anything or during its startup my guess is that it will
throw many page faults which are just related to data being loaded into RAM.
I just looked on my machine and even Microsoft software like Outlook is
showing over 50,000 "page faults".
|