#include "ntrtlp.h"
#include "heap.h"
#include "heappriv.h"
Go to the source code of this file.
Functions | |
VOID | RtlpUpdateHeapListIndex (USHORT OldIndex, USHORT NewIndex) |
BOOLEAN | RtlpValidateHeapHeaders (IN PHEAP Heap, IN BOOLEAN Recompute) |
PVOID | RtlDebugCreateHeap (IN ULONG Flags, IN PVOID HeapBase OPTIONAL, IN SIZE_T ReserveSize OPTIONAL, IN SIZE_T CommitSize OPTIONAL, IN PVOID Lock OPTIONAL, IN PRTL_HEAP_PARAMETERS Parameters) |
BOOLEAN | RtlpSerializeHeap (IN PVOID HeapHandle) |
BOOLEAN | RtlDebugDestroyHeap (IN PVOID HeapHandle) |
PVOID | RtlDebugAllocateHeap (IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size) |
PVOID | RtlDebugReAllocateHeap (IN PVOID HeapHandle, IN ULONG Flags, IN PVOID BaseAddress, IN SIZE_T Size) |
BOOLEAN | RtlDebugFreeHeap (IN PVOID HeapHandle, IN ULONG Flags, IN PVOID BaseAddress) |
BOOLEAN | RtlDebugGetUserInfoHeap (IN PVOID HeapHandle, IN ULONG Flags, IN PVOID BaseAddress, OUT PVOID *UserValue OPTIONAL, OUT PULONG UserFlags OPTIONAL) |
BOOLEAN | RtlDebugSetUserValueHeap (IN PVOID HeapHandle, IN ULONG Flags, IN PVOID BaseAddress, IN PVOID UserValue) |
BOOLEAN | RtlDebugSetUserFlagsHeap (IN PVOID HeapHandle, IN ULONG Flags, IN PVOID BaseAddress, IN ULONG UserFlagsReset, IN ULONG UserFlagsSet) |
SIZE_T | RtlDebugSizeHeap (IN PVOID HeapHandle, IN ULONG Flags, IN PVOID BaseAddress) |
SIZE_T | RtlDebugCompactHeap (IN PVOID HeapHandle, IN ULONG Flags) |
NTSTATUS | RtlDebugZeroHeap (IN PVOID HeapHandle, IN ULONG Flags) |
NTSTATUS | RtlDebugCreateTagHeap (IN PVOID HeapHandle, IN ULONG Flags, IN PWSTR TagPrefix OPTIONAL, IN PWSTR TagNames) |
NTSYSAPI PWSTR NTAPI | RtlDebugQueryTagHeap (IN PVOID HeapHandle, IN ULONG Flags, IN USHORT TagIndex, IN BOOLEAN ResetCounters, OUT PRTL_HEAP_TAG_INFO TagInfo OPTIONAL) |
NTSTATUS | RtlDebugUsageHeap (IN PVOID HeapHandle, IN ULONG Flags, IN OUT PRTL_HEAP_USAGE Usage) |
BOOLEAN | RtlDebugWalkHeap (IN PVOID HeapHandle, IN OUT PRTL_HEAP_WALK_ENTRY Entry) |
BOOLEAN | RtlpValidateHeapEntry (IN PHEAP Heap, IN PHEAP_ENTRY BusyBlock, IN PCHAR Reason) |
BOOLEAN | RtlpValidateHeapSegment (IN PHEAP Heap, IN PHEAP_SEGMENT Segment, IN UCHAR SegmentIndex, IN OUT PULONG CountOfFreeBlocks, IN OUT PSIZE_T TotalFreeSize, OUT PVOID *BadAddress, IN OUT PSIZE_T ComputedTagEntries, IN OUT PSIZE_T ComputedPseudoTagEntries) |
BOOLEAN | RtlpValidateHeap (IN PHEAP Heap, IN BOOLEAN AlwaysValidate) |
VOID | RtlpBreakPointHeap (IN PVOID BadAddress) |
Variables | |
BOOLEAN | RtlpValidateHeapHdrsEnable = FALSE |
BOOLEAN | RtlpValidateHeapTagsEnable |
HEAP_STOP_ON_VALUES | RtlpHeapStopOn |
struct { | |
ULONG Offset | |
LPSTR Description | |
} | RtlpHeapHeaderFieldOffsets [] |
BOOLEAN | RtlpHeapInvalidBreakPoint |
PVOID | RtlpHeapInvalidBadAddress |
|
Definition at line 444 of file heapdbg.c. References _HEAP::AlignMask, _HEAP::AlignRound, _HEAP_STOP_ON_VALUES::AllocAddress, _HEAP_ENTRY_EXTRA::AllocatorBackTraceIndex, _HEAP_STOP_ON_VALUES::AllocTag, EXCEPTION_CONTINUE_SEARCH, EXCEPTION_EXECUTE_HANDLER, FALSE, _HEAP::Flags, _HEAP_ENTRY::Flags, _HEAP::ForceFlags, HEAP_CAPTURE_STACK_BACKTRACES, HEAP_ENTRY_EXTRA_PRESENT, HEAP_SKIP_VALIDATION_CHECKS, HEAP_VALIDATE_ALL_ENABLED, HeapDebugBreak, HeapDebugPrint, HeapHandle, _HEAP_STOP_ON_TAG::HeapIndex, IF_DEBUG_PAGE_HEAP_THEN_RETURN, IS_HEAP_TAGGING_ENABLED, _HEAP::LockVariable, _HEAP::MaximumAllocationSize, NULL, _HEAP::ProcessHeapsListIndex, RtlAcquireLockRoutine, RtlAllocateHeapSlowly(), RtlpCheckHeapSignature(), RtlpDebugPageHeapAllocate(), RtlpGetExtraStuffPointer(), RtlpGetTagName(), RtlpHeapStopOn, RtlpValidateHeap(), RtlpValidateHeapHeaders(), RtlReleaseLockRoutine, SET_LAST_STATUS, Size, _HEAP_ENTRY::SmallTagIndex, _HEAP_STOP_ON_TAG::TagIndex, _HEAP_ENTRY_EXTRA::TagIndex, TRUE, and USHORT. Referenced by RtlAllocateHeapSlowly().
|
|
Definition at line 1260 of file heapdbg.c. References EXCEPTION_EXECUTE_HANDLER, FALSE, _HEAP::ForceFlags, HEAP_SKIP_VALIDATION_CHECKS, HeapHandle, IF_DEBUG_PAGE_HEAP_THEN_RETURN, _HEAP::LockVariable, RtlAcquireLockRoutine, RtlCompactHeap(), RtlpCheckHeapSignature(), RtlpDebugPageHeapCompact(), RtlpValidateHeap(), RtlpValidateHeapHeaders(), RtlReleaseLockRoutine, SET_LAST_STATUS, and TRUE. Referenced by RtlCompactHeap().
|
|
Definition at line 204 of file heapdbg.c. References _HEAP::AllocatorBackTraceIndex, _HEAP::Flags, HEAP_CAPTURE_STACK_BACKTRACES, HEAP_SKIP_VALIDATION_CHECKS, HeapDebugBreak, HeapDebugPrint, Lock, NT_SUCCESS, NtQueryVirtualMemory(), NTSTATUS(), NULL, RtlCreateHeap(), RtlpValidateHeapHeaders(), Status, TRUE, and USHORT. Referenced by RtlCreateHeap().
|
|
Definition at line 1421 of file heapdbg.c. References EXCEPTION_EXECUTE_HANDLER, FALSE, _HEAP::ForceFlags, HEAP_SKIP_VALIDATION_CHECKS, HeapHandle, _HEAP::LockVariable, RtlAcquireLockRoutine, RtlCreateTagHeap(), RtlpCheckHeapSignature(), RtlpValidateHeap(), RtlpValidateHeapHeaders(), RtlReleaseLockRoutine, SET_LAST_STATUS, and TRUE. Referenced by RtlCreateTagHeap().
|
|
Definition at line 388 of file heapdbg.c. References FALSE, _HEAP::HeaderValidateCopy, HeapDebugPrint, HeapHandle, n, NtFreeVirtualMemory(), NULL, RtlpCheckHeapSignature(), RtlpValidateHeap(), _HEAP::Signature, and TRUE. Referenced by RtlDestroyHeap().
|
|
Definition at line 797 of file heapdbg.c. References EXCEPTION_EXECUTE_HANDLER, FALSE, _HEAP_ENTRY::Flags, _HEAP::ForceFlags, _HEAP_STOP_ON_VALUES::FreeAddress, _HEAP_STOP_ON_VALUES::FreeTag, HEAP_ENTRY_EXTRA_PRESENT, HEAP_GRANULARITY_SHIFT, HEAP_SKIP_VALIDATION_CHECKS, _HEAP_STOP_ON_TAG::HeapAndTagIndex, HeapDebugBreak, HeapDebugPrint, HeapHandle, _HEAP_STOP_ON_TAG::HeapIndex, IF_DEBUG_PAGE_HEAP_THEN_RETURN, IS_HEAP_TAGGING_ENABLED, _HEAP::LockVariable, NULL, _HEAP::ProcessHeapsListIndex, RtlAcquireLockRoutine, RtlFreeHeapSlowly(), RtlpCheckHeapSignature(), RtlpDebugPageHeapFree(), RtlpGetExtraStuffPointer(), RtlpGetTagName(), RtlpHeapStopOn, RtlpValidateHeap(), RtlpValidateHeapEntry(), RtlpValidateHeapHeaders(), RtlReleaseLockRoutine, SET_LAST_STATUS, _HEAP_ENTRY::Size, Size, _HEAP_ENTRY::SmallTagIndex, _HEAP_STOP_ON_TAG::TagIndex, _HEAP_ENTRY_EXTRA::TagIndex, TRUE, and USHORT. Referenced by RtlFreeHeapSlowly().
|
|
Definition at line 919 of file heapdbg.c. References EXCEPTION_EXECUTE_HANDLER, FALSE, _HEAP::ForceFlags, HEAP_SKIP_VALIDATION_CHECKS, HeapHandle, IF_DEBUG_PAGE_HEAP_THEN_RETURN, _HEAP::LockVariable, RtlAcquireLockRoutine, RtlGetUserInfoHeap(), RtlpCheckHeapSignature(), RtlpDebugPageHeapGetUserInfo(), RtlpValidateHeap(), RtlpValidateHeapEntry(), RtlReleaseLockRoutine, SET_LAST_STATUS, and TRUE. Referenced by RtlGetUserInfoHeap().
|
|
Definition at line 1498 of file heapdbg.c. References EXCEPTION_EXECUTE_HANDLER, FALSE, _HEAP::ForceFlags, HEAP_SKIP_VALIDATION_CHECKS, HeapHandle, _HEAP::LockVariable, NULL, RtlAcquireLockRoutine, RtlpCheckHeapSignature(), RtlpValidateHeap(), RtlQueryTagHeap(), RtlReleaseLockRoutine, SET_LAST_STATUS, and TRUE. Referenced by RtlQueryTagHeap().
|
|
Definition at line 603 of file heapdbg.c. References _HEAP::AlignMask, _HEAP::AlignRound, _HEAP_ENTRY_EXTRA::AllocatorBackTraceIndex, EXCEPTION_CONTINUE_SEARCH, EXCEPTION_EXECUTE_HANDLER, FALSE, _HEAP_ENTRY::Flags, _HEAP::Flags, _HEAP::ForceFlags, HEAP_CAPTURE_STACK_BACKTRACES, HEAP_ENTRY_EXTRA_PRESENT, HEAP_SKIP_VALIDATION_CHECKS, _HEAP_STOP_ON_TAG::HeapAndTagIndex, HeapDebugBreak, HeapDebugPrint, HeapHandle, _HEAP_STOP_ON_TAG::HeapIndex, IF_DEBUG_PAGE_HEAP_THEN_RETURN, IS_HEAP_TAGGING_ENABLED, _HEAP::LockVariable, _HEAP::MaximumAllocationSize, NULL, _HEAP::ProcessHeapsListIndex, _HEAP_STOP_ON_VALUES::ReAllocAddress, _HEAP_STOP_ON_VALUES::ReAllocTag, RtlAcquireLockRoutine, RtlpCheckHeapSignature(), RtlpDebugPageHeapReAllocate(), RtlpGetExtraStuffPointer(), RtlpGetTagName(), RtlpHeapStopOn, RtlpValidateHeap(), RtlpValidateHeapEntry(), RtlpValidateHeapHeaders(), RtlReAllocateHeap(), RtlReleaseLockRoutine, SET_LAST_STATUS, Size, _HEAP_ENTRY::SmallTagIndex, _HEAP_ENTRY_EXTRA::TagIndex, _HEAP_STOP_ON_TAG::TagIndex, TRUE, and USHORT. Referenced by RtlReAllocateHeap().
|
|
Definition at line 1086 of file heapdbg.c. References EXCEPTION_EXECUTE_HANDLER, FALSE, _HEAP::ForceFlags, HEAP_SKIP_VALIDATION_CHECKS, HeapHandle, IF_DEBUG_PAGE_HEAP_THEN_RETURN, _HEAP::LockVariable, RtlAcquireLockRoutine, RtlpCheckHeapSignature(), RtlpDebugPageHeapSetUserFlags(), RtlpValidateHeap(), RtlpValidateHeapEntry(), RtlReleaseLockRoutine, RtlSetUserFlagsHeap(), SET_LAST_STATUS, and TRUE. Referenced by RtlSetUserFlagsHeap().
|
|
Definition at line 1002 of file heapdbg.c. References EXCEPTION_EXECUTE_HANDLER, FALSE, _HEAP::ForceFlags, HEAP_SKIP_VALIDATION_CHECKS, HeapHandle, IF_DEBUG_PAGE_HEAP_THEN_RETURN, _HEAP::LockVariable, RtlAcquireLockRoutine, RtlpCheckHeapSignature(), RtlpDebugPageHeapSetUserValue(), RtlpValidateHeap(), RtlpValidateHeapEntry(), RtlReleaseLockRoutine, RtlSetUserValueHeap(), SET_LAST_STATUS, and TRUE. Referenced by RtlSetUserValueHeap().
|
|
Definition at line 1177 of file heapdbg.c. References EXCEPTION_EXECUTE_HANDLER, FALSE, _HEAP::ForceFlags, HEAP_SKIP_VALIDATION_CHECKS, HeapHandle, IF_DEBUG_PAGE_HEAP_THEN_RETURN, _HEAP::LockVariable, RtlAcquireLockRoutine, RtlpCheckHeapSignature(), RtlpDebugPageHeapSize(), RtlpValidateHeap(), RtlpValidateHeapEntry(), RtlReleaseLockRoutine, RtlSizeHeap(), SET_LAST_STATUS, and TRUE. Referenced by RtlSizeHeap().
|
|
Definition at line 1572 of file heapdbg.c. References EXCEPTION_EXECUTE_HANDLER, FALSE, _HEAP::ForceFlags, HEAP_SKIP_VALIDATION_CHECKS, HeapHandle, IF_DEBUG_PAGE_HEAP_THEN_RETURN, _HEAP::LockVariable, NTSTATUS(), RtlAcquireLockRoutine, RtlpCheckHeapSignature(), RtlpDebugPageHeapUsage(), RtlpValidateHeap(), RtlReleaseLockRoutine, RtlUsageHeap(), Status, TRUE, and Usage(). Referenced by RtlUsageHeap().
|
|
Definition at line 1654 of file heapdbg.c. References EXCEPTION_EXECUTE_HANDLER, FALSE, HeapHandle, RtlpCheckHeapSignature(), RtlpValidateHeap(), and SET_LAST_STATUS. Referenced by RtlWalkHeap().
|
|
Definition at line 1338 of file heapdbg.c. References EXCEPTION_EXECUTE_HANDLER, FALSE, _HEAP::ForceFlags, HEAP_SKIP_VALIDATION_CHECKS, HeapHandle, IF_DEBUG_PAGE_HEAP_THEN_RETURN, _HEAP::LockVariable, NTSTATUS(), RtlAcquireLockRoutine, RtlpCheckHeapSignature(), RtlpDebugPageHeapZero(), RtlpValidateHeap(), RtlReleaseLockRoutine, RtlZeroHeap(), Status, and TRUE. Referenced by RtlZeroHeap().
|
|
Definition at line 2351 of file heapdbg.c. References FALSE, RtlpHeapInvalidBadAddress, RtlpHeapInvalidBreakPoint, and TRUE.
|
|
Definition at line 323 of file heapdbg.c. References FALSE, _HEAP::Flags, _HEAP::ForceFlags, HeapHandle, IF_DEBUG_PAGE_HEAP_THEN_RETURN, Lock, _HEAP::LockVariable, NT_SUCCESS, NTSTATUS(), NULL, RtlAllocateHeap, RtlFreeHeap, RtlInitializeLockRoutine, RtlpCheckHeapSignature(), RtlpDebugPageHeapSerialize(), RtlpValidateHeapHeaders(), Status, and TRUE. Referenced by LdrpInitializeTls().
|
|
Definition at line 76 of file heapdbg.c. References _HEAP_STOP_ON_VALUES::AllocTag, _HEAP_STOP_ON_VALUES::FreeTag, _HEAP_STOP_ON_TAG::HeapIndex, _HEAP_STOP_ON_VALUES::ReAllocTag, and RtlpHeapStopOn. Referenced by RtlpRemoveHeapFromProcessList().
|
|
Definition at line 2025 of file heapdbg.c. References _HEAP_VIRTUAL_ALLOC_ENTRY::BusyBlock, _HEAP_VIRTUAL_ALLOC_ENTRY::CommitSize, exit, _HEAP_VIRTUAL_ALLOC_ENTRY::ExtraStuff, FALSE, _HEAP_ENTRY::Flags, HEAP_ENTRY_BUSY, HEAP_ENTRY_FILL_PATTERN, HEAP_GRANULARITY_SHIFT, HEAP_MAXIMUM_FREELISTS, HEAP_MAXIMUM_SEGMENTS, HEAP_NUMBER_OF_PSEUDO_TAG, HEAP_VALIDATE_ALL_ENABLED, HeapDebugBreak, HeapDebugPrint, NT_SUCCESS, NtAllocateVirtualMemory(), NtFreeVirtualMemory(), NTSTATUS(), NULL, RTL_PAGED_CODE, RtlpCheckBusyBlockTail(), RtlpValidateHeapHeaders(), RtlpValidateHeapSegment(), RtlpValidateHeapTagsEnable, Size, _HEAP_PSEUDO_TAG_ENTRY::Size, _HEAP_TAG_ENTRY::Size, Status, _HEAP_ENTRY_EXTRA::TagIndex, _HEAP_TAG_ENTRY::TagName, TRUE, and USHORT. Referenced by RtlDebugAllocateHeap(), RtlDebugCompactHeap(), RtlDebugCreateTagHeap(), RtlDebugDestroyHeap(), RtlDebugFreeHeap(), RtlDebugGetUserInfoHeap(), RtlDebugQueryTagHeap(), RtlDebugReAllocateHeap(), RtlDebugSetUserFlagsHeap(), RtlDebugSetUserValueHeap(), RtlDebugSizeHeap(), RtlDebugUsageHeap(), RtlDebugWalkHeap(), RtlDebugZeroHeap(), and RtlValidateHeap().
|
|
Definition at line 1696 of file heapdbg.c. References FALSE, _HEAP_SEGMENT::FirstEntry, HEAP_ENTRY_BUSY, HEAP_ENTRY_FILL_PATTERN, HEAP_ENTRY_VIRTUAL_ALLOC, HEAP_GRANULARITY, HEAP_MAXIMUM_SEGMENTS, HeapDebugBreak, HeapDebugPrint, _HEAP_SEGMENT::LastValidEntry, NULL, PAGE_SIZE, RtlpCheckBusyBlockTail(), and TRUE. Referenced by RtlDebugFreeHeap(), RtlDebugGetUserInfoHeap(), RtlDebugReAllocateHeap(), RtlDebugSetUserFlagsHeap(), RtlDebugSetUserValueHeap(), RtlDebugSizeHeap(), and RtlValidateHeap().
|
|
Definition at line 112 of file heapdbg.c. References DbgPrint, Description, FALSE, HeapDebugPrint, n, NT_SUCCESS, NtAllocateVirtualMemory(), NTSTATUS(), NULL, RtlpHeapHeaderFieldOffsets, RtlpValidateHeapHdrsEnable, Status, and TRUE. Referenced by RtlDebugAllocateHeap(), RtlDebugCompactHeap(), RtlDebugCreateHeap(), RtlDebugCreateTagHeap(), RtlDebugFreeHeap(), RtlDebugReAllocateHeap(), RtlpGrowBlockInPlace(), RtlpSerializeHeap(), and RtlpValidateHeap().
|
|
Definition at line 1790 of file heapdbg.c. References _HEAP_UNCOMMMTTED_RANGE::Address, FALSE, FREE_HEAP_FILL, HEAP_ENTRY_BUSY, HEAP_ENTRY_EXTRA_PRESENT, HEAP_ENTRY_FILL_PATTERN, HEAP_ENTRY_LAST_ENTRY, HEAP_GRANULARITY_SHIFT, HEAP_NUMBER_OF_PSEUDO_TAG, HeapDebugPrint, _HEAP_UNCOMMMTTED_RANGE::Next, NULL, PAGE_SIZE, RTL_PAGED_CODE, RtlCompareMemoryUlong(), RtlpCheckBusyBlockTail(), RtlpGetExtraStuffPointer(), _HEAP_UNCOMMMTTED_RANGE::Size, Size, _HEAP_ENTRY_EXTRA::TagIndex, TRUE, and USHORT. Referenced by RtlpValidateHeap().
|
|
|
|
Referenced by RtlpValidateHeapHeaders(). |
|
Definition at line 2348 of file heapdbg.c. Referenced by RtlpBreakPointHeap(). |
|
Definition at line 2347 of file heapdbg.c. Referenced by RtlpBreakPointHeap(). |
|
Definition at line 28 of file heapdbg.c. Referenced by RtlDebugAllocateHeap(), RtlDebugFreeHeap(), RtlDebugReAllocateHeap(), and RtlpUpdateHeapListIndex(). |
|
Definition at line 25 of file heapdbg.c. Referenced by RtlpValidateHeapHeaders(). |
|
Definition at line 26 of file heapdbg.c. Referenced by RtlpValidateHeap(). |