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.

110 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. mpheap.h
  5. Abstract:
  6. Public header file for MP heap package
  7. Author:
  8. John Vert (jvert) 10-Jul-1995
  9. Revision History:
  10. --*/
  11. //
  12. // Valid heap creation options
  13. //
  14. #define MPHEAP_GROWABLE HEAP_GROWABLE
  15. #define MPHEAP_REALLOC_IN_PLACE_ONLY HEAP_REALLOC_IN_PLACE_ONLY
  16. #define MPHEAP_TAIL_CHECKING_ENABLED HEAP_TAIL_CHECKING_ENABLED
  17. #define MPHEAP_FREE_CHECKING_ENABLED HEAP_FREE_CHECKING_ENABLED
  18. #define MPHEAP_DISABLE_COALESCE_ON_FREE HEAP_DISABLE_COALESCE_ON_FREE
  19. #define MPHEAP_ZERO_MEMORY HEAP_ZERO_MEMORY
  20. #define MPHEAP_COLLECT_STATS 0x10000000
  21. HANDLE
  22. WINAPI
  23. MpHeapCreate(
  24. DWORD flOptions,
  25. DWORD dwInitialSize,
  26. DWORD dwParallelism
  27. );
  28. BOOL
  29. WINAPI
  30. MpHeapDestroy(
  31. HANDLE hMpHeap
  32. );
  33. BOOL
  34. WINAPI
  35. MpHeapValidate(
  36. HANDLE hMpHeap,
  37. LPVOID lpMem
  38. );
  39. SIZE_T
  40. WINAPI
  41. MpHeapCompact(
  42. HANDLE hMpHeap
  43. );
  44. LPVOID
  45. WINAPI
  46. MpHeapAlloc(
  47. HANDLE hMpHeap,
  48. DWORD flOptions,
  49. DWORD dwBytes
  50. );
  51. LPVOID
  52. WINAPI
  53. MpHeapReAlloc(
  54. HANDLE hMpHeap,
  55. LPVOID lpMem,
  56. DWORD dwBytes
  57. );
  58. BOOL
  59. WINAPI
  60. MpHeapFree(
  61. HANDLE hMpHeap,
  62. LPVOID lpMem
  63. );
  64. SIZE_T
  65. WINAPI
  66. MpHeapSize(
  67. HANDLE hMpHeap,
  68. DWORD ulFlags,
  69. LPVOID lpMem
  70. );
  71. //
  72. // Statistics structure
  73. //
  74. typedef struct _MPHEAP_STATISTICS {
  75. DWORD Contention;
  76. DWORD TotalAllocates;
  77. DWORD TotalFrees;
  78. DWORD LookasideAllocates;
  79. DWORD LookasideFrees;
  80. DWORD DelayedFrees;
  81. } MPHEAP_STATISTICS, *LPMPHEAP_STATISTICS;
  82. DWORD
  83. MpHeapGetStatistics(
  84. HANDLE hMpHeap,
  85. LPDWORD lpdwSize,
  86. MPHEAP_STATISTICS Statistics[]
  87. );
  88. //
  89. // TLS index for exchmem heap selection
  90. //
  91. extern DWORD tlsiHeapHint;