57 if (dwMaximumSize == 0)
59 else if (dwMaximumSize < BaseStaticServerData->SysInfo.PageSize &&
60 dwInitialSize > dwMaximumSize)
64 dwMaximumSize = dwInitialSize;
103 return RtlGetProcessHeap();
296 DPRINT1(
"Warning, HeapWalk is calling RtlWalkHeap with Win32 parameters\n");
323 HeapInformationClass,
325 HeapInformationLength,
350 HeapInformationClass,
352 HeapInformationLength);
884 HandleEntry->
Flags &= ~BASE_HEAP_ENTRY_FLAG_REUSABLE;
908 hMem = &HandleEntry->
Object;
915 hMem = &HandleEntry->
Object;
950 Flags &= ~HEAP_REALLOC_IN_PLACE_ONLY;
962 HandleEntry->
Flags &= ~BASE_HEAP_ENTRY_FLAG_REUSE;
1013 if (!HandleEntry->
Object)
1289 sizeof(PerformanceInfo),
1305 lpBuffer->ullTotalPhys = PhysicalMemory;
1310 lpBuffer->ullAvailPhys = PhysicalMemory;
1355 lpBuffer->ullAvailExtendedVirtual = 0;
1367 MEMORYSTATUSEX lpBufferEx;
1370 lpBufferEx.dwLength =
sizeof(MEMORYSTATUSEX);
1375 lpBuffer->dwMemoryLoad = lpBufferEx.dwMemoryLoad;
1669 HandleEntry->
Flags &= ~BASE_HEAP_ENTRY_FLAG_REUSABLE;
1693 hMem = &HandleEntry->
Object;
1699 hMem = &HandleEntry->
Object;
1734 Flags &= ~HEAP_REALLOC_IN_PLACE_ONLY;
1746 HandleEntry->
Flags &= ~BASE_HEAP_ENTRY_FLAG_REUSE;
#define BaseHeapAllocEntry()
#define BASE_TRACE_DEALLOC(x)
#define BASE_TRACE_FAILURE()
#define BASE_HEAP_ENTRY_FLAG_REUSE
#define BaseHeapGetEntry(h)
#define BASE_HEAP_FLAG_MOVABLE
#define BASE_TRACE_ALLOC(x, y)
#define BASE_TRACE_HANDLE(x, y)
#define BASE_HEAP_ENTRY_FLAG_MOVABLE
#define BASE_HEAP_IS_HANDLE_ENTRY
#define BASE_TRACE_ALLOC2(x)
#define BaseHeapFreeEntry(he)
#define BaseHeapValidateEntry(he)
#define BASE_TRACE_PTR(x, y)
#define BASE_HEAP_ENTRY_FLAG_REUSABLE
#define BASE_HEAP_ENTRY_FLAG_DDESHARE
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
#define STATUS_NOT_IMPLEMENTED
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
#define ERROR_NOT_ENOUGH_MEMORY
#define NT_SUCCESS(StatCode)
#define ERROR_INVALID_PARAMETER
#define INVALID_HANDLE_VALUE
#define ERROR_INVALID_HANDLE
PBASE_STATIC_SERVER_DATA BaseStaticServerData
BOOL WINAPI IsBadReadPtr(IN LPCVOID lp, IN UINT_PTR ucb)
IN CINT OUT PVOID IN ULONG OUT PULONG ReturnLength
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
LPVOID NTAPI GlobalWire(HGLOBAL hMem)
BOOL WINAPI HeapQueryInformation(HANDLE HeapHandle, HEAP_INFORMATION_CLASS HeapInformationClass, PVOID HeapInformation OPTIONAL, SIZE_T HeapInformationLength OPTIONAL, PSIZE_T ReturnLength OPTIONAL)
VOID NTAPI BaseDllInitializeMemoryManager(VOID)
HGLOBAL NTAPI GlobalHandle(LPCVOID pMem)
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
HANDLE WINAPI HeapCreate(DWORD flOptions, SIZE_T dwInitialSize, SIZE_T dwMaximumSize)
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
HGLOBAL NTAPI GlobalReAlloc(HGLOBAL hMem, SIZE_T dwBytes, UINT uFlags)
UINT NTAPI GlobalFlags(HGLOBAL hMem)
HLOCAL NTAPI LocalReAlloc(HLOCAL hMem, SIZE_T dwBytes, UINT uFlags)
SIZE_T WINAPI HeapCompact(HANDLE hHeap, DWORD dwFlags)
SIZE_T WINAPI LocalShrink(HLOCAL hMem, UINT cbNewSize)
BOOL NTAPI GlobalUnWire(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
DWORD WINAPI HeapExtend(HANDLE hHeap, DWORD dwFlags, PVOID BaseAddress, DWORD dwBytes)
BOOL WINAPI HeapLock(HANDLE hHeap)
LPVOID NTAPI LocalLock(HLOCAL hMem)
BOOL NTAPI LocalUnlock(HLOCAL hMem)
BOOL WINAPI HeapValidate(HANDLE hHeap, DWORD dwFlags, LPCVOID lpMem)
PWSTR WINAPI HeapQueryTagW(HANDLE hHeap, DWORD dwFlags, WORD wTagIndex, BOOL bResetCounters, PVOID lpTagInfo)
BOOL WINAPI HeapUnlock(HANDLE hHeap)
SIZE_T NTAPI LocalCompact(UINT dwMinFree)
ULONG_PTR SystemRangeStart
VOID NTAPI GlobalMemoryStatus(LPMEMORYSTATUS lpBuffer)
BOOL WINAPI HeapSetInformation(HANDLE HeapHandle, HEAP_INFORMATION_CLASS HeapInformationClass, PVOID HeapInformation OPTIONAL, SIZE_T HeapInformationLength OPTIONAL)
VOID NTAPI GlobalUnfix(HGLOBAL hMem)
BOOL WINAPI HeapDestroy(HANDLE hHeap)
RTL_HANDLE_TABLE BaseHeapHandleTable
SIZE_T NTAPI LocalSize(HLOCAL hMem)
BOOL WINAPI HeapWalk(HANDLE hHeap, LPPROCESS_HEAP_ENTRY lpEntry)
BOOL WINAPI HeapUsage(HANDLE hHeap, DWORD dwFlags, DWORD Unknown, DWORD Unknown2, IN PVOID Usage)
HLOCAL NTAPI LocalHandle(LPCVOID pMem)
VOID NTAPI GlobalFix(HGLOBAL hMem)
UINT NTAPI LocalFlags(HLOCAL hMem)
BOOL WINAPI HeapSummary(HANDLE hHeap, DWORD dwFlags, PVOID Summary)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
SIZE_T NTAPI GlobalCompact(DWORD dwMinFree)
SIZE_T NTAPI GlobalSize(HGLOBAL hMem)
DWORD WINAPI GetProcessHeaps(DWORD NumberOfHeaps, PHANDLE ProcessHeaps)
DWORD WINAPI HeapCreateTagsW(_In_ HANDLE hHeap, _In_ DWORD dwFlags, _In_opt_ PWSTR lpTagName, _In_ PWSTR lpTagSubName)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
BOOL NTAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX lpBuffer)
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
NTSYSAPI PVOID WINAPI RtlReAllocateHeap(HANDLE, ULONG, PVOID, SIZE_T)
NTSYSAPI ULONG WINAPI RtlGetProcessHeaps(ULONG, HANDLE *)
NTSYSAPI NTSTATUS WINAPI RtlWalkHeap(HANDLE, PVOID)
NTSYSAPI BOOLEAN WINAPI RtlValidateHeap(HANDLE, ULONG, LPCVOID)
NTSYSAPI NTSTATUS WINAPI RtlSetHeapInformation(HANDLE, HEAP_INFORMATION_CLASS, PVOID, SIZE_T)
NTSYSAPI BOOLEAN WINAPI RtlUnlockHeap(HANDLE)
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
NTSYSAPI NTSTATUS WINAPI RtlQueryHeapInformation(HANDLE, HEAP_INFORMATION_CLASS, PVOID, SIZE_T, PSIZE_T)
NTSYSAPI BOOLEAN WINAPI RtlLockHeap(HANDLE)
NTSYSAPI ULONG WINAPI RtlCompactHeap(HANDLE, ULONG)
#define EXCEPTION_EXECUTE_HANDLER
struct _QUOTA_LIMITS QUOTA_LIMITS
#define SystemPerformanceInformation
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
@ SystemRangeStartInformation
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
NTSYSAPI VOID NTAPI RtlInitializeHandleTable(_In_ ULONG TableSize, _In_ ULONG HandleSize, _In_ PRTL_HANDLE_TABLE HandleTable)
NTSYSAPI SIZE_T NTAPI RtlSizeHeap(_In_ PVOID HeapHandle, _In_ ULONG Flags, _In_ PVOID MemoryPointer)
enum _HEAP_INFORMATION_CLASS HEAP_INFORMATION_CLASS
NTSYSAPI PVOID NTAPI RtlDestroyHeap(IN PVOID HeapHandle)
#define HEAP_GENERATE_EXCEPTIONS
NTSYSAPI PVOID NTAPI RtlCreateHeap(IN ULONG Flags, IN PVOID HeapBase OPTIONAL, IN ULONG ReserveSize OPTIONAL, IN ULONG CommitSize OPTIONAL, IN PVOID Lock OPTIONAL, IN PRTL_HEAP_PARAMETERS Parameters OPTIONAL)
#define NtCurrentProcess()
#define HEAP_SETTABLE_USER_VALUE
#define HEAP_REALLOC_IN_PLACE_ONLY
#define HEAP_NO_SERIALIZE
NTSTATUS NTAPI NtQueryInformationProcess(_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _Out_ PVOID ProcessInformation, _In_ ULONG ProcessInformationLength, _Out_opt_ PULONG ReturnLength)
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
DWORD BaseSetLastNTError(IN NTSTATUS Status)
BOOLEAN NTAPI RtlGetUserInfoHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID BaseAddress, OUT PVOID *UserValue, OUT PULONG UserFlags)
PWSTR NTAPI RtlQueryTagHeap(IN PVOID HeapHandle, IN ULONG Flags, IN USHORT TagIndex, IN BOOLEAN ResetCounters, OUT PRTL_HEAP_TAG_INFO HeapTagInfo)
ULONG NTAPI RtlCreateTagHeap(_In_ HANDLE HeapHandle, _In_ ULONG Flags, _In_opt_ PWSTR TagName, _In_ PWSTR TagSubName)
BOOLEAN NTAPI RtlSetUserValueHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID BaseAddress, IN PVOID UserValue)
PULONG MinorVersion OPTIONAL
NTSYSAPI NTSTATUS NTAPI NtQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInfoClass, OUT PVOID SystemInfoBuffer, IN ULONG SystemInfoBufferSize, OUT PULONG BytesReturned OPTIONAL)
SYSTEM_BASIC_INFORMATION SysInfo
#define RtlCopyMemory(Destination, Source, Length)
#define RtlMoveMemory(Destination, Source, Length)
#define STATUS_MORE_ENTRIES
struct _MEMORYSTATUS MEMORYSTATUS
#define GMEM_INVALID_HANDLE
#define LMEM_INVALID_HANDLE
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
_In_ PATHOBJ _In_ CLIPOBJ _In_ BRUSHOBJ _In_ POINTL _In_ MIX _In_ FLONG flOptions
_Must_inspect_result_ _In_ ULONG Flags