1 /** 2 * This file is part of the mingw-w64 runtime package. 3 * No warranty is given; refer to the file DISCLAIMER within this package. 4 */ 5 #ifndef _HEAPAPI_H_ 6 #define _HEAPAPI_H_ 7 8 #include <apiset.h> 9 #include <apisetcconv.h> 10 #include <minwindef.h> 11 #include <minwinbase.h> 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 18 typedef struct _HEAP_SUMMARY { 19 DWORD cb; 20 SIZE_T cbAllocated; 21 SIZE_T cbCommitted; 22 SIZE_T cbReserved; 23 SIZE_T cbMaxReserve; 24 } HEAP_SUMMARY,*PHEAP_SUMMARY; 25 26 typedef PHEAP_SUMMARY LPHEAP_SUMMARY; 27 28 WINBASEAPI HANDLE WINAPI HeapCreate (DWORD flOptions, SIZE_T dwInitialSize, SIZE_T dwMaximumSize); 29 WINBASEAPI WINBOOL WINAPI HeapDestroy (HANDLE hHeap); 30 WINBASEAPI WINBOOL WINAPI HeapValidate (HANDLE hHeap, DWORD dwFlags, LPCVOID lpMem); 31 WINBASEAPI SIZE_T WINAPI HeapCompact (HANDLE hHeap, DWORD dwFlags); 32 WINBOOL WINAPI HeapSummary (HANDLE hHeap, DWORD dwFlags, LPHEAP_SUMMARY lpSummary); 33 WINBASEAPI DWORD WINAPI GetProcessHeaps (DWORD NumberOfHeaps, PHANDLE ProcessHeaps); 34 WINBASEAPI WINBOOL WINAPI HeapLock (HANDLE hHeap); 35 WINBASEAPI WINBOOL WINAPI HeapUnlock (HANDLE hHeap); 36 WINBASEAPI WINBOOL WINAPI HeapWalk (HANDLE hHeap, LPPROCESS_HEAP_ENTRY lpEntry); 37 WINBASEAPI WINBOOL WINAPI HeapSetInformation (HANDLE HeapHandle, HEAP_INFORMATION_CLASS HeapInformationClass, PVOID HeapInformation, SIZE_T HeapInformationLength); 38 WINBASEAPI WINBOOL WINAPI HeapQueryInformation (HANDLE HeapHandle, HEAP_INFORMATION_CLASS HeapInformationClass, PVOID HeapInformation, SIZE_T HeapInformationLength, PSIZE_T ReturnLength); 39 #endif 40 41 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) 42 WINBASEAPI LPVOID WINAPI HeapAlloc (HANDLE hHeap, DWORD dwFlags, SIZE_T dwBytes); 43 WINBASEAPI LPVOID WINAPI HeapReAlloc (HANDLE hHeap, DWORD dwFlags, LPVOID lpMem, SIZE_T dwBytes); 44 WINBASEAPI WINBOOL WINAPI HeapFree (HANDLE hHeap, DWORD dwFlags, LPVOID lpMem); 45 WINBASEAPI SIZE_T WINAPI HeapSize (HANDLE hHeap, DWORD dwFlags, LPCVOID lpMem); 46 WINBASEAPI HANDLE WINAPI GetProcessHeap (VOID); 47 #endif 48 49 #ifdef __cplusplus 50 } 51 #endif 52 #endif 53