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.

114 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. session.hxx
  5. Abstract:
  6. This file declares routines to handle sessions.
  7. Author:
  8. Jason Hartman (JasonHa) 2000-12-21
  9. Environment:
  10. User Mode
  11. --*/
  12. #ifndef _SESSION_HXX_
  13. #define _SESSION_HXX_
  14. #include "typeout.hxx"
  15. #define CURRENT_SESSION -1
  16. #define DEFAULT_SESSION -2
  17. #define INVALID_SESSION -3
  18. typedef HRESULT (* PoolFilterFunc)(
  19. OutputControl *OutCtl,
  20. ULONG64 PoolAddr,
  21. ULONG TagFilter,
  22. TypeOutputParser *PoolHeadReader,
  23. PDEBUG_VALUE Tag,
  24. ULONG BlockSize,
  25. BOOL bQuotaWithTag,
  26. PVOID Context
  27. );
  28. typedef struct _ALLOCATION_STATS {
  29. ULONG AllocatedPages;
  30. ULONG LargePages;
  31. ULONG LargeAllocs;
  32. ULONG FreePages;
  33. ULONG ExpansionPages;
  34. ULONG Allocated; // Number of allocated entries
  35. ULONG AllocatedSize; // Size in Pool Blocks
  36. ULONG Free; // Number of free entries
  37. ULONG FreeSize; // Size in Pool Blocks
  38. ULONG Indeterminate; // Number of entries with interdeterminable alloc/free status
  39. ULONG IndeterminateSize; // Size in Pool Blocks
  40. } ALLOCATION_STATS, *PALLOCATION_STATS;
  41. extern ULONG SessionId;
  42. extern CHAR SessionStr[16];
  43. void SessionInit(PDEBUG_CLIENT Client);
  44. void SessionExit();
  45. HRESULT
  46. GetPhysicalAddress(
  47. PDEBUG_CLIENT Client,
  48. ULONG Session,
  49. ULONG64 VirtAddr,
  50. PULONG64 PhysAddr
  51. );
  52. HRESULT
  53. GetCurrentSession(
  54. PDEBUG_CLIENT Client,
  55. PULONG64 CurSessionSpace,
  56. PULONG CurSessionId
  57. );
  58. HRESULT
  59. GetSessionSpace(
  60. PDEBUG_CLIENT Client,
  61. ULONG Session,
  62. PULONG64 SessionSpace
  63. );
  64. #define SEARCH_POOL_NONPAGED 0x0001
  65. #define SEARCH_POOL_PAGED 0x0002
  66. #define SEARCH_POOL_LARGE_ONLY 0x0004
  67. #define SEARCH_POOL_PRINT_LARGE 0x0008
  68. #define SEARCH_POOL_PRINT_UNREAD 0x0010
  69. HRESULT
  70. SearchSessionPool(
  71. PDEBUG_CLIENT Client,
  72. ULONG Session,
  73. ULONG TagName,
  74. FLONG Flags,
  75. ULONG64 RestartAddr,
  76. PoolFilterFunc Filter,
  77. PALLOCATION_STATS AllocStats,
  78. PVOID Context
  79. );
  80. #endif _SESSION_HXX_