Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.8 KiB

  1. ///////////////////////////////////////////////////////////////////////////
  2. // File: MemStats.h
  3. //
  4. // Copyright (c) 2001 Microsoft Corporation. All Rights Reserved.
  5. //
  6. // Purpose:
  7. // MemStats.h: Helper functions that get's the system memory info.
  8. // Borrowed from EricI's memstats app.
  9. //
  10. // History:
  11. // 03/21/01 DennisCh Created
  12. //
  13. //////////////////////////////////////////////////////////////////////
  14. #if !defined(AFX_MEMSTATS_H__D91043CB_5CB3_47C9_944F_B9FAA9BD26C4__INCLUDED_)
  15. #define AFX_MEMSTATS_H__D91043CB_5CB3_47C9_944F_B9FAA9BD26C4__INCLUDED_
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif // _MSC_VER > 1000
  19. //////////////////////////////////////////////////////////////////////
  20. // Includes
  21. //////////////////////////////////////////////////////////////////////
  22. #define UNICODE
  23. #define _UNICODE
  24. //
  25. // WIN32 headers
  26. //
  27. #include <windows.h>
  28. #include <pdh.h>
  29. #include <shlwapi.h>
  30. //
  31. // Project headers
  32. //
  33. #include "WinHttpStressScheduler.h"
  34. #include "ServerCommands.h"
  35. //////////////////////////////////////////////////////////////////////
  36. // Constants
  37. //////////////////////////////////////////////////////////////////////
  38. // struct for process memory stats
  39. #define PROCCOUNTERS 4
  40. struct PROC_CNTRS {
  41. ULONG lPID;
  42. ULONG lPrivBytes;
  43. ULONG lHandles;
  44. ULONG lThreads;
  45. };
  46. // struct for system wide memory stats
  47. #define MEMCOUNTERS 9
  48. struct MEM_CNTRS {
  49. ULONG lCommittedBytes;
  50. ULONG lCommitLimit;
  51. ULONG lSystemCodeTotalBytes;
  52. ULONG lSystemDriverTotalBytes;
  53. ULONG lPoolNonpagedBytes;
  54. ULONG lPoolPagedBytes;
  55. ULONG lAvailableBytes;
  56. ULONG lCacheBytes;
  57. ULONG lFreeSystemPageTableEntries;
  58. };
  59. BOOL MemStats__SendSystemMemoryLog(LPSTR, DWORD, DWORD);
  60. #endif // !defined(AFX_MEMSTATS_H__D91043CB_5CB3_47C9_944F_B9FAA9BD26C4__INCLUDED_)