Simon Mourier's Avatar
Simon Mourier's blog (1351 answers on StackOverflow) about Microsoft technologies C#, C/C++, .NET, WinRT, WinUI, COM, Interop, DirectX, Direct2D, Windows, ...
  • 🔎︎ Search
  • Categories
  • Archives
  • About Me
  • tracing
  • winapi

Programatically read program's page fault count on Windows

Jun 20, 2011 See the question and my original answer on StackOverflow

There is a C/C++ sample on Microsoft's site that explain how to read performance counters: INFO: PDH Sample Code to Enumerate Performance Counters and Instances

You can copy/paste it and I think you're interested by the "Memory" / "Page Reads/sec" counters, as stated in this interesting article: The Basics of Page Faults

  • SmoBlog © 2010-2025 Simon Mourier. All rights reserved.
  • Privacy & Terms