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.

200 lines
2.3 KiB

  1. /*
  2. - E X C H M E M . H
  3. -
  4. * Purpose:
  5. *
  6. *
  7. * Parameters:
  8. *
  9. *
  10. * Returns:
  11. *
  12. *
  13. * Copyright (C) 1995-96, Microsoft Corporation.
  14. */
  15. #ifndef _EXCHMEM_
  16. #define _EXCHMEM_
  17. #ifdef __cplusplus
  18. extern "C"
  19. {
  20. #endif
  21. // Additional Heap Flags
  22. #define HEAP_NO_FREE 0x00001000
  23. // API Function Prototypes
  24. HANDLE
  25. WINAPI
  26. ExchHeapCreate(
  27. DWORD dwFlags,
  28. DWORD dwInitialSize,
  29. DWORD dwMaxSize);
  30. BOOL
  31. WINAPI
  32. ExchHeapDestroy(
  33. HANDLE hHeap);
  34. LPVOID
  35. WINAPI
  36. ExchHeapAlloc(
  37. HANDLE hHeap,
  38. DWORD dwFlags,
  39. DWORD dwSize);
  40. LPVOID
  41. WINAPI
  42. ExchHeapReAlloc(
  43. HANDLE hHeap,
  44. DWORD dwFlags,
  45. LPVOID pvOld,
  46. DWORD dwSize);
  47. BOOL
  48. WINAPI
  49. ExchHeapFree(
  50. HANDLE hHeap,
  51. DWORD dwFlags,
  52. LPVOID pvFree);
  53. BOOL
  54. WINAPI
  55. ExchHeapLock(
  56. HANDLE hHeap);
  57. BOOL
  58. WINAPI
  59. ExchHeapUnlock(
  60. HANDLE hHeap);
  61. BOOL
  62. WINAPI
  63. ExchHeapWalk(
  64. HANDLE hHeap,
  65. LPPROCESS_HEAP_ENTRY lpEntry);
  66. BOOL
  67. WINAPI
  68. ExchHeapValidate(
  69. HANDLE hHeap,
  70. DWORD dwFlags,
  71. LPCVOID lpMem);
  72. SIZE_T
  73. WINAPI
  74. ExchHeapSize(
  75. HANDLE hHeap,
  76. DWORD dwFlags,
  77. LPCVOID lpMem);
  78. SIZE_T
  79. WINAPI
  80. ExchHeapCompact(
  81. HANDLE hHeap,
  82. DWORD dwFlags);
  83. HANDLE
  84. WINAPI
  85. ExchMHeapCreate(
  86. ULONG cHeaps,
  87. DWORD dwFlags,
  88. DWORD dwInitialSize,
  89. DWORD dwMaxSize);
  90. BOOL
  91. WINAPI
  92. ExchMHeapDestroy(void);
  93. LPVOID
  94. WINAPI
  95. ExchMHeapAlloc(
  96. DWORD dwSize);
  97. LPVOID
  98. WINAPI
  99. ExchMHeapAllocDebug(DWORD dwSize, char *szFileName, DWORD dwLineNumber);
  100. LPVOID
  101. WINAPI
  102. ExchMHeapReAlloc(LPVOID pvOld, DWORD dwSize);
  103. LPVOID
  104. WINAPI
  105. ExchMHeapReAllocDebug(LPVOID pvOld, DWORD dwSize, char *szFileName, DWORD dwLineNumber);
  106. BOOL
  107. WINAPI
  108. ExchMHeapFree(
  109. LPVOID pvFree);
  110. SIZE_T
  111. WINAPI
  112. ExchMHeapSize(
  113. LPVOID pvSize);
  114. LPVOID
  115. WINAPI
  116. ExchAlloc(
  117. DWORD dwSize);
  118. LPVOID
  119. WINAPI
  120. ExchReAlloc(
  121. LPVOID pvOld,
  122. DWORD dwSize);
  123. BOOL
  124. WINAPI
  125. ExchFree(
  126. LPVOID pvFree);
  127. SIZE_T
  128. WINAPI
  129. ExchSize(
  130. LPVOID pv);
  131. //
  132. // Misc. Debug functions. Available in retail and debug exchmem, but retail version is simply a stub..
  133. //
  134. VOID
  135. WINAPI
  136. ExchmemGetCallStack(DWORD_PTR *rgdwCaller, DWORD cFind);
  137. VOID
  138. WINAPI
  139. ExchmemFormatSymbol(HANDLE hProcess, DWORD_PTR dwCaller, char rgchSymbol[], DWORD cbSymbol);
  140. DWORD
  141. WINAPI
  142. ExchmemReloadSymbols(void);
  143. #ifdef __cplusplus
  144. }
  145. #endif
  146. #endif // _EXCHMEM_