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.

112 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_H_
  13. #define _SESSION_H_
  14. #define CURRENT_SESSION -1
  15. #define DEFAULT_SESSION -2
  16. #define INVALID_SESSION -3
  17. typedef HRESULT (* PoolFilterFunc)(
  18. ULONG64 PoolAddr,
  19. ULONG TagFilter,
  20. ULONG64 PoolHeader,
  21. PDEBUG_VALUE Tag,
  22. ULONG BlockSize,
  23. BOOL bQuotaWithTag,
  24. PVOID Context
  25. );
  26. typedef struct _ALLOCATION_STATS {
  27. ULONG AllocatedPages;
  28. ULONG LargePages;
  29. ULONG LargeAllocs;
  30. ULONG FreePages;
  31. ULONG ExpansionPages;
  32. ULONG Allocated; // Number of allocated entries
  33. ULONG AllocatedSize; // Size in Pool Blocks
  34. ULONG Free; // Number of free entries
  35. ULONG FreeSize; // Size in Pool Blocks
  36. ULONG Indeterminate; // Number of entries with interdeterminable alloc/free status
  37. ULONG IndeterminateSize; // Size in Pool Blocks
  38. } ALLOCATION_STATS, *PALLOCATION_STATS;
  39. extern ULONG SessionId;
  40. extern CHAR SessionStr[16];
  41. void SessionInit(PDEBUG_CLIENT Client);
  42. void SessionExit();
  43. HRESULT
  44. GetSessionPhysicalAddress(
  45. PDEBUG_CLIENT Client,
  46. ULONG Session,
  47. ULONG64 VirtAddr,
  48. PULONG64 PhysAddr
  49. );
  50. HRESULT
  51. GetCurrentSession(
  52. PULONG64 CurSessionSpace,
  53. PULONG CurSessionId
  54. );
  55. HRESULT
  56. GetSessionSpace(
  57. ULONG Session,
  58. PULONG64 SessionSpace,
  59. PULONG64 SessionProcess
  60. );
  61. #define SEARCH_POOL_NONPAGED 0x0001
  62. #define SEARCH_POOL_PAGED 0x0002
  63. #define SEARCH_POOL_LARGE_ONLY 0x0004
  64. #define SEARCH_POOL_PRINT_LARGE 0x0008
  65. #define SEARCH_POOL_PRINT_UNREAD 0x0010
  66. #define INVALID_UNIQUE_STATE 0
  67. HRESULT
  68. SearchSessionPool(
  69. PDEBUG_CLIENT Client,
  70. ULONG Session,
  71. ULONG TagName,
  72. FLONG Flags,
  73. ULONG64 RestartAddr,
  74. PoolFilterFunc Filter,
  75. PALLOCATION_STATS AllocStats,
  76. PVOID Context
  77. );
  78. #endif _SESSION_H_