ReactOS  0.4.15-dev-3175-g222acf5
heap.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS System Libraries
4  * FILE: lib/rtl/heap.h
5  * PURPOSE: Run-Time Libary Heap Manager header
6  * PROGRAMMER: Aleksey Bragin
7  */
8 
9 /* INCLUDES ******************************************************************/
10 
11 #ifndef RTL_HEAP_H
12 #define RTL_HEAP_H
13 
14 /* Core heap definitions */
15 #define HEAP_SEGMENTS 64
16 
17 #define HEAP_ENTRY_SIZE ((ULONG)sizeof(HEAP_ENTRY))
18 #ifdef _WIN64
19 #define HEAP_ENTRY_SHIFT 4
20 #else
21 #define HEAP_ENTRY_SHIFT 3
22 #endif
23 #define HEAP_MAX_BLOCK_SIZE ((0x80000 - PAGE_SIZE) >> HEAP_ENTRY_SHIFT)
24 
25 #define ARENA_INUSE_FILLER 0xBAADF00D
26 #define ARENA_FREE_FILLER 0xFEEEFEEE
27 #define HEAP_TAIL_FILL 0xab
28 
29 // from ntifs.h, should go to another header!
30 #define HEAP_GLOBAL_TAG 0x0800
31 #define HEAP_PSEUDO_TAG_FLAG 0x8000
32 #define HEAP_TAG_MASK (HEAP_MAXIMUM_TAG << HEAP_TAG_SHIFT)
33 #define HEAP_TAGS_MASK (HEAP_TAG_MASK ^ (0xFF << HEAP_TAG_SHIFT))
34 
35 #define HEAP_EXTRA_FLAGS_MASK (HEAP_CAPTURE_STACK_BACKTRACES | \
36  HEAP_SETTABLE_USER_VALUE | \
37  HEAP_TAGS_MASK)
38 
39 /* Heap entry flags */
40 #define HEAP_ENTRY_BUSY 0x01
41 #define HEAP_ENTRY_EXTRA_PRESENT 0x02
42 #define HEAP_ENTRY_FILL_PATTERN 0x04
43 #define HEAP_ENTRY_VIRTUAL_ALLOC 0x08
44 #define HEAP_ENTRY_LAST_ENTRY 0x10
45 #define HEAP_ENTRY_SETTABLE_FLAG1 0x20
46 #define HEAP_ENTRY_SETTABLE_FLAG2 0x40
47 #define HEAP_ENTRY_SETTABLE_FLAG3 0x80
48 #define HEAP_ENTRY_SETTABLE_FLAGS (HEAP_ENTRY_SETTABLE_FLAG1 | HEAP_ENTRY_SETTABLE_FLAG2 | HEAP_ENTRY_SETTABLE_FLAG3)
49 
50 /* Signatures */
51 #define HEAP_SIGNATURE 0xeefeeff
52 #define HEAP_SEGMENT_SIGNATURE 0xffeeffee
53 
54 /* Segment flags */
55 #define HEAP_USER_ALLOCATED 0x1
56 
57 /* A handy inline to distinguis normal heap, special "debug heap" and special "page heap" */
60 {
62 
68  {
69  /* This is a special heap */
70  return TRUE;
71  }
72 
73  /* No need for a special treatment */
74  return FALSE;
75 }
76 
77 /* Heap structures */
79 {
80 #ifdef _M_AMD64
81  PVOID PreviousBlockPrivateData;
82 #endif
83  union
84  {
85  struct
86  {
90  };
91  struct
92  {
93 #ifndef _M_AMD64
95 #else
96  ULONG SubSegmentCodeDummy;
97 #endif
99  union
100  {
103  };
105  };
106  struct
107  {
110  };
111  struct
112  {
117  };
118  struct
119  {
124  };
126  };
127 };
128 
129 typedef struct _HEAP_FREE_ENTRY
130 {
134 
135 typedef struct _HEAP_ENTRY
136 {
137  struct _HEAP_COMMON_ENTRY;
139 
140 #ifdef _WIN64
141 C_ASSERT(sizeof(HEAP_ENTRY) == 16);
142 #else
143 C_ASSERT(sizeof(HEAP_ENTRY) == 8);
144 #endif
145 C_ASSERT((1 << HEAP_ENTRY_SHIFT) == sizeof(HEAP_ENTRY));
146 C_ASSERT((2 << HEAP_ENTRY_SHIFT) == sizeof(HEAP_FREE_ENTRY));
147 
148 typedef struct _HEAP_TAG_ENTRY
149 {
157 
159 {
164 
165 typedef struct _HEAP_COUNTERS
166 {
186 
188 {
192 
193 typedef struct _HEAP_LIST_LOOKUP
194 {
205 
206 #define HEAP_SEGMENT_MEMBERS \
207  HEAP_ENTRY Entry; \
208  ULONG SegmentSignature; \
209  ULONG SegmentFlags; \
210  LIST_ENTRY SegmentListEntry; \
211  struct _HEAP *Heap; \
212  PVOID BaseAddress; \
213  ULONG NumberOfPages; \
214  PHEAP_ENTRY FirstEntry; \
215  PHEAP_ENTRY LastValidEntry; \
216  ULONG NumberOfUnCommittedPages; \
217  ULONG NumberOfUnCommittedRanges; \
218  USHORT SegmentAllocatorBackTraceIndex; \
219  USHORT Reserved; \
220  LIST_ENTRY UCRSegmentList
221 
222 typedef struct _HEAP
223 {
225 
248  LIST_ENTRY UCRSegments; // FIXME: non-Vista
253  struct _HEAP_SEGMENT *Segments[HEAP_SEGMENTS]; //FIXME: non-Vista
256  PVOID BlocksIndex; // HEAP_LIST_LOOKUP
267  RTL_BITMAP FreeHintBitmap; // FIXME: non-Vista
268  PLIST_ENTRY FreeHints[ANYSIZE_ARRAY]; // FIXME: non-Vista
269 } HEAP, *PHEAP;
270 
271 typedef struct _HEAP_SEGMENT
272 {
275 
276 typedef struct _HEAP_UCR_DESCRIPTOR
277 {
283 
284 typedef struct _HEAP_UCR_SEGMENT
285 {
290 
291 typedef struct _HEAP_ENTRY_EXTRA
292 {
293  union
294  {
295  struct
296  {
300  };
302  };
304 
306 
308 {
315 
316 /* Global variables */
319 
320 /* Functions declarations */
321 
322 /* heap.c */
325  PHEAP_FREE_ENTRY FreeEntry,
326  PSIZE_T FreeSize,
327  BOOLEAN Remove);
328 
331 
333 RtlpValidateHeap(PHEAP Heap, BOOLEAN ForceValidation);
334 
336 RtlpValidateHeapEntry(PHEAP Heap, PHEAP_ENTRY HeapEntry);
337 
339 RtlpValidateHeapHeaders(PHEAP Heap, BOOLEAN Recalculate);
340 
341 /* heapdbg.c */
344  PVOID Addr,
345  SIZE_T TotalSize,
347  PVOID Lock,
349 
351 RtlDebugDestroyHeap(HANDLE HeapPtr);
352 
353 PVOID NTAPI
355  ULONG Flags,
356  SIZE_T Size);
357 
358 PVOID NTAPI
360  ULONG Flags,
361  PVOID Ptr,
362  SIZE_T Size);
363 
365 RtlDebugFreeHeap(HANDLE HeapPtr,
366  ULONG Flags,
367  PVOID Ptr);
368 
370 RtlDebugGetUserInfoHeap(PVOID HeapHandle,
371  ULONG Flags,
373  PVOID *UserValue,
374  PULONG UserFlags);
375 
378  ULONG Flags,
380  PVOID UserValue);
381 
382 BOOLEAN
383 NTAPI
385  ULONG Flags,
387  ULONG UserFlagsReset,
388  ULONG UserFlagsSet);
389 
391 RtlDebugSizeHeap(HANDLE HeapPtr,
392  ULONG Flags,
393  PVOID Ptr);
394 
395 /* heappage.c */
396 
399  PVOID Addr,
400  SIZE_T TotalSize,
402  PVOID Lock,
404 
405 PVOID NTAPI
406 RtlpPageHeapDestroy(HANDLE HeapPtr);
407 
408 PVOID NTAPI
410  IN ULONG Flags,
411  IN SIZE_T Size);
412 
414 RtlpPageHeapFree(HANDLE HeapPtr,
415  ULONG Flags,
416  PVOID Ptr);
417 
418 PVOID NTAPI
420  ULONG Flags,
421  PVOID Ptr,
422  SIZE_T Size);
423 
425 RtlpPageHeapLock(HANDLE HeapPtr);
426 
428 RtlpPageHeapUnlock(HANDLE HeapPtr);
429 
431 RtlpPageHeapGetUserInfo(PVOID HeapHandle,
432  ULONG Flags,
434  PVOID *UserValue,
435  PULONG UserFlags);
436 
439  ULONG Flags,
441  PVOID UserValue);
442 
443 BOOLEAN
444 NTAPI
446  ULONG Flags,
448  ULONG UserFlagsReset,
449  ULONG UserFlagsSet);
450 
451 BOOLEAN
452 NTAPI
454  ULONG Flags,
455  PVOID Block);
456 
458 RtlpPageHeapSize(HANDLE HeapPtr,
459  ULONG Flags,
460  PVOID Ptr);
461 
462 VOID
463 NTAPI
465 
466 VOID
467 NTAPI
469 
470 VOID
471 NTAPI
473 
474 #endif
PVOID BlocksIndex
Definition: heap.h:256
ULONG_PTR Settable
Definition: heap.h:299
LIST_ENTRY Entry
Definition: heap.h:309
PRTL_HEAP_COMMIT_ROUTINE CommitRoutine
Definition: heap.h:261
ULONG ItemCount
Definition: heap.h:198
struct _HEAP_TUNING_PARAMETERS * PHEAP_TUNING_PARAMETERS
LIST_ENTRY SegmentList
Definition: heap.h:252
BOOLEAN NTAPI RtlDebugSetUserFlagsHeap(PVOID HeapHandle, ULONG Flags, PVOID BaseAddress, ULONG UserFlagsReset, ULONG UserFlagsSet)
Definition: heapdbg.c:431
#define IN
Definition: typedefs.h:39
ULONG InBlockDeccommits
Definition: heap.h:183
Definition: heap.h:307
ULONG InBlockCommitFailures
Definition: heap.h:180
struct _HEAP_TAG_ENTRY * PHEAP_TAG_ENTRY
UCHAR Flags
Definition: heap.h:88
PVOID SubSegmentCode
Definition: heap.h:94
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:863
struct _HEAP_FREE_ENTRY HEAP_FREE_ENTRY
SIZE_T TotalFreeSize
Definition: heap.h:239
ULONG Frees
Definition: heap.h:151
#define HEAP_SEGMENTS
Definition: heap.h:15
#define ANYSIZE_ARRAY
Definition: typedefs.h:46
struct _HEAP_UCR_DESCRIPTOR * PHEAP_UCR_DESCRIPTOR
struct _HEAP_SEGMENT HEAP_SEGMENT
#define TRUE
Definition: types.h:120
PLIST_ENTRY ListHead
Definition: heap.h:201
PHEAP_FREE_ENTRY NTAPI RtlpCoalesceFreeBlocks(PHEAP Heap, PHEAP_FREE_ENTRY FreeEntry, PSIZE_T FreeSize, BOOLEAN Remove)
Definition: heap.c:1150
BOOLEAN NTAPI RtlpValidateHeapHeaders(PHEAP Heap, BOOLEAN Recalculate)
Definition: heap.c:3260
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
struct _HEAP_COUNTERS * PHEAP_COUNTERS
LIST_ENTRY FreeLists
Definition: heap.h:259
PVOID FrontEndHeap
Definition: heap.h:262
SIZE_T MaximumAllocationSize
Definition: heap.h:240
USHORT TagIndex
Definition: heap.h:298
ULONG Signature
Definition: heap.h:234
USHORT NextAvailableTagIndex
Definition: heap.h:244
USHORT Size
Definition: heap.h:87
LIST_ENTRY FreeList
Definition: heap.h:131
UCHAR Code4
Definition: heap.h:123
ULONG VirtualMemoryThreshold
Definition: heap.h:233
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
USHORT FrontHeapLockCount
Definition: heap.h:263
ULONG TotalSegments
Definition: heap.h:171
BOOLEAN NTAPI RtlDebugSetUserValueHeap(PVOID HeapHandle, ULONG Flags, PVOID BaseAddress, PVOID UserValue)
Definition: heapdbg.c:375
PULONG ListsInUseUlong
Definition: heap.h:202
SIZE_T InBlockDeccomitSize
Definition: heap.h:184
ULONG_PTR PointerKey
Definition: heap.h:231
BOOLEAN NTAPI RtlpValidateHeap(PHEAP Heap, BOOLEAN ForceValidation)
Definition: heap.c:3513
struct _HEAP_VIRTUAL_ALLOC_ENTRY * PHEAP_VIRTUAL_ALLOC_ENTRY
Definition: heap.h:158
PLIST_ENTRY * ListHints
Definition: heap.h:203
WCHAR TagName[24]
Definition: heap.h:155
struct _HEAP_TUNING_PARAMETERS HEAP_TUNING_PARAMETERS
PVOID HeaderValidateCopy
Definition: heap.h:243
ULONG Code1
Definition: heap.h:120
BOOLEAN NTAPI RtlpPageHeapLock(HANDLE HeapPtr)
Definition: heappage.c:2354
ULONG InterceptorValue
Definition: heap.h:113
#define HEAP_CREATE_ENABLE_TRACING
Definition: nt_native.h:1702
struct _HEAP_TAG_ENTRY HEAP_TAG_ENTRY
uint32_t ULONG_PTR
Definition: typedefs.h:65
struct _HEAP_SEGMENT * Segments[HEAP_SEGMENTS]
Definition: heap.h:253
SIZE_T ReservedSize
Definition: heap.h:287
struct _HEAP_SEGMENT * PHEAP_SEGMENT
struct _HEAP * PHEAP
ULONG Size
Definition: heap.h:152
SIZE_T TotalMemoryCommitted
Definition: heap.h:168
RTL_CRITICAL_SECTION RtlpProcessHeapsListLock
Definition: heapuser.c:17
#define HEAP_SKIP_VALIDATION_CHECKS
Definition: rtltypes.h:165
struct _HEAP_LIST_LOOKUP * ExtendedLookup
Definition: heap.h:195
ULONG_PTR * PSIZE_T
Definition: typedefs.h:80
ULONG_PTR AlignMask
Definition: heap.h:250
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
SIZE_T ReserveSize
Definition: heap.h:312
#define FALSE
Definition: types.h:117
Definition: heap.h:291
USHORT HeaderValidateLength
Definition: heap.h:242
UCHAR SegmentOffset
Definition: heap.h:101
ULONG BaseIndex
Definition: heap.h:200
PHEAP_LOCK LockVariable
Definition: heap.h:260
PLIST_ENTRY FreeHints[ANYSIZE_ARRAY]
Definition: heap.h:268
PHEAP_PSEUDO_TAG_ENTRY PseudoTagEntries
Definition: heap.h:258
HEAP_ENTRY Encoding
Definition: heap.h:230
ULONG ArraySize
Definition: heap.h:196
UCHAR ExtendedBlockSignature
Definition: heap.h:116
HEAP_SEGMENT_MEMBERS
Definition: heap.h:273
ULONG Allocs
Definition: heap.h:160
ULONG LockCollisions
Definition: heap.h:176
Definition: heap.h:78
Definition: heap.h:129
unsigned char BOOLEAN
ULONG DecommittRate
Definition: heap.h:178
struct _HEAP_ENTRY * PHEAP_ENTRY
UCHAR Code3
Definition: heap.h:122
RTL_BITMAP FreeHintBitmap
Definition: heap.h:267
struct _HEAP_UCR_SEGMENT HEAP_UCR_SEGMENT
BOOLEAN NTAPI RtlDebugFreeHeap(HANDLE HeapPtr, ULONG Flags, PVOID Ptr)
Definition: heapdbg.c:267
_In_ BOOLEAN Remove
Definition: psfuncs.h:110
SIZE_T CommittedSize
Definition: heap.h:288
ULONG CommitRate
Definition: heap.h:177
#define HEAP_VALIDATE_PARAMETERS_ENABLED
Definition: rtltypes.h:167
#define HEAP_ENTRY_SHIFT
Definition: heap.h:21
USHORT PreviousSize
Definition: heap.h:98
BOOLEAN NTAPI RtlpPageHeapSetUserValue(PVOID HeapHandle, ULONG Flags, PVOID BaseAddress, PVOID UserValue)
Definition: heappage.c:2166
ULONG LockAcquires
Definition: heap.h:175
ULONG NonDedicatedListLength
Definition: heap.h:255
PVOID NTAPI RtlDebugReAllocateHeap(HANDLE HeapPtr, ULONG Flags, PVOID Ptr, SIZE_T Size)
Definition: heapdbg.c:195
HEAP_TUNING_PARAMETERS TuningParameters
Definition: heap.h:266
ULONG Allocs
Definition: heap.h:150
BOOLEAN NTAPI RtlpPageHeapGetUserInfo(PVOID HeapHandle, ULONG Flags, PVOID BaseAddress, PVOID *UserValue, PULONG UserFlags)
Definition: heappage.c:2124
PVOID NTAPI RtlpPageHeapDestroy(HANDLE HeapPtr)
Definition: heappage.c:1613
BOOLEAN NTAPI RtlDebugDestroyHeap(HANDLE HeapPtr)
Definition: heapdbg.c:95
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
struct _HEAP_PSEUDO_TAG_ENTRY HEAP_PSEUDO_TAG_ENTRY
ULONG CompactHeapCalls
Definition: heap.h:181
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
SIZE_T CommitSize
Definition: heap.h:311
ULONG CommittThresholdShift
Definition: heap.h:189
UCHAR FrontEndHeapType
Definition: heap.h:264
__wchar_t WCHAR
Definition: xmlstorage.h:180
LIST_ENTRY UCRSegments
Definition: heap.h:248
uint64_t ULONGLONG
Definition: typedefs.h:67
#define HEAP_VALIDATE_ALL_ENABLED
Definition: rtltypes.h:166
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T CommitSize
Definition: mmfuncs.h:404
ULONG CommittOps
Definition: heap.h:173
USHORT UnusedBytesLength
Definition: heap.h:114
LIST_ENTRY VirtualAllocdBlocks
Definition: heap.h:251
ULONG ExtraItem
Definition: heap.h:197
HEAP_SEGMENT_MEMBERS
Definition: heap.h:224
PVOID NTAPI RtlpPageHeapReAllocate(HANDLE HeapPtr, ULONG Flags, PVOID Ptr, SIZE_T Size)
Definition: heappage.c:1954
NTSTATUS(* PRTL_HEAP_COMMIT_ROUTINE)(IN PVOID Base, IN OUT PVOID *CommitAddress, IN OUT PULONG CommitSize)
Definition: nt_native.h:1660
SIZE_T TotalSizeInVirtualBlocks
Definition: heap.h:170
struct _HEAP_VIRTUAL_ALLOC_ENTRY HEAP_VIRTUAL_ALLOC_ENTRY
USHORT AllocatorBackTraceIndex
Definition: heap.h:297
HEAP_COUNTERS Counters
Definition: heap.h:265
UCHAR UnusedBytes
Definition: heap.h:104
struct _HEAP_UCR_SEGMENT * PHEAP_UCR_SEGMENT
VOID NTAPI RtlpRemoveHeapFromProcessList(PHEAP Heap)
Definition: heapuser.c:56
USHORT ContextValue
Definition: heap.h:109
struct _HEAP HEAP
unsigned char UCHAR
Definition: xmlstorage.h:181
LIST_ENTRY SegmentEntry
Definition: heap.h:279
PHEAP_TAG_ENTRY TagEntries
Definition: heap.h:246
ULONG Frees
Definition: heap.h:161
VOID NTAPI RtlpAddHeapToProcessList(PHEAP Heap)
Definition: heapuser.c:23
ULONG CompactedUCRs
Definition: heap.h:182
LIST_ENTRY UCRList
Definition: heap.h:247
struct _HEAP_PSEUDO_TAG_ENTRY * PHEAP_PSEUDO_TAG_ENTRY
struct _HEAP_FREE_ENTRY * PHEAP_FREE_ENTRY
ULONG DeCommitOps
Definition: heap.h:174
Definition: typedefs.h:119
struct _HEAP_ENTRY HEAP_ENTRY
#define HEAP_FLAG_PAGE_ALLOCS
Definition: rtltypes.h:160
SIZE_T NTAPI RtlDebugSizeHeap(HANDLE HeapPtr, ULONG Flags, PVOID Ptr)
Definition: heapdbg.c:494
PHEAP_ENTRY_EXTRA NTAPI RtlpGetExtraStuffPointer(PHEAP_ENTRY HeapEntry)
Definition: heap.c:2632
USHORT MaximumTagIndex
Definition: heap.h:245
USHORT CreatorBackTraceIndex
Definition: heap.h:154
SIZE_T NTAPI RtlpPageHeapSize(HANDLE HeapPtr, ULONG Flags, PVOID Ptr)
Definition: heappage.c:2249
LIST_ENTRY ListEntry
Definition: heap.h:278
PVOID NTAPI RtlpPageHeapAllocate(IN PVOID HeapPtr, IN ULONG Flags, IN SIZE_T Size)
Definition: heappage.c:1697
struct _HEAP_LIST_LOOKUP HEAP_LIST_LOOKUP
BOOLEAN NTAPI RtlDebugGetUserInfoHeap(PVOID HeapHandle, ULONG Flags, PVOID BaseAddress, PVOID *UserValue, PULONG UserFlags)
Definition: heapdbg.c:322
ULONG CompatibilityFlags
Definition: heap.h:228
BOOLEAN NTAPI RtlpValidateHeapEntry(PHEAP Heap, PHEAP_ENTRY HeapEntry)
Definition: heap.c:3269
SIZE_T TotalMemoryLargeUCR
Definition: heap.h:169
ULONG_PTR SIZE_T
Definition: typedefs.h:80
USHORT AllocatorBackTraceIndex
Definition: heap.h:254
PVOID UCRIndex
Definition: heap.h:257
ULONG_PTR AlignRound
Definition: heap.h:249
Definition: heap.h:135
SIZE_T SegmentReserve
Definition: heap.h:235
unsigned short USHORT
Definition: pedump.c:61
SIZE_T TotalMemoryReserved
Definition: heap.h:167
ULONG Flags
Definition: heap.h:226
BOOLEAN NTAPI RtlpPageHeapSetUserFlags(PVOID HeapHandle, ULONG Flags, PVOID BaseAddress, ULONG UserFlagsReset, ULONG UserFlagsSet)
Definition: heappage.c:2207
USHORT ProcessHeapsListIndex
Definition: heap.h:241
SIZE_T MaxPreCommittThreshold
Definition: heap.h:190
USHORT FunctionIndex
Definition: heap.h:108
USHORT TagIndex
Definition: heap.h:153
#define FORCEINLINE
Definition: wdftypes.h:67
struct _HEAP_ENTRY_EXTRA HEAP_ENTRY_EXTRA
SIZE_T SegmentCommit
Definition: heap.h:236
SIZE_T Size
Definition: heap.h:162
unsigned int * PULONG
Definition: retypes.h:1
USHORT Code2
Definition: heap.h:121
ULONG OutOfRangeItems
Definition: heap.h:199
ULONG CommitFailures
Definition: heap.h:179
Definition: heap.h:148
PVOID NTAPI RtlDebugAllocateHeap(PVOID HeapPtr, ULONG Flags, SIZE_T Size)
Definition: heapdbg.c:130
BOOLEAN NTAPI RtlpPageHeapUnlock(HANDLE HeapPtr)
Definition: heappage.c:2368
HEAP_ENTRY_EXTRA ExtraStuff
Definition: heap.h:310
SIZE_T DeCommitFreeBlockThreshold
Definition: heap.h:237
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:124
ULONG TotalUCRs
Definition: heap.h:172
UCHAR LFHFlags
Definition: heap.h:102
unsigned int ULONG
Definition: retypes.h:1
UINT64 ZeroInit
Definition: heap.h:301
UCHAR SmallTagIndex
Definition: heap.h:89
ULONG ForceFlags
Definition: heap.h:227
HEAP_ENTRY BusyBlock
Definition: heap.h:313
LIST_ENTRY ListEntry
Definition: heap.h:286
#define HEAP_CAPTURE_STACK_BACKTRACES
Definition: rtltypes.h:164
ULONGLONG AgregateCode
Definition: heap.h:125
unsigned long long UINT64
struct _HEAP_LIST_LOOKUP * PHEAP_LIST_LOOKUP
UCHAR EntryOffset
Definition: heap.h:115
SIZE_T DeCommitTotalFreeThreshold
Definition: heap.h:238
BOOLEAN NTAPI RtlpPageHeapFree(HANDLE HeapPtr, ULONG Flags, PVOID Ptr)
Definition: heappage.c:1862
VOID NTAPI RtlInitializeHeapManager(VOID)
Definition: libsupp.c:250
HANDLE NTAPI RtlDebugCreateHeap(ULONG Flags, PVOID Addr, SIZE_T TotalSize, SIZE_T CommitSize, PVOID Lock, PRTL_HEAP_PARAMETERS Parameters)
Definition: heapdbg.c:20
HEAP_ENTRY_EXTRA HEAP_FREE_ENTRY_EXTRA
Definition: heap.h:305
struct _HEAP_COUNTERS HEAP_COUNTERS
C_ASSERT(sizeof(HEAP_ENTRY)==8)
ULONG Interceptor
Definition: heap.h:232
BOOLEAN NTAPI RtlpDebugPageHeapValidate(PVOID HeapPtr, ULONG Flags, PVOID Block)
Definition: heappage.c:2290
HANDLE NTAPI RtlpPageHeapCreate(ULONG Flags, PVOID Addr, SIZE_T TotalSize, SIZE_T CommitSize, PVOID Lock, PRTL_HEAP_PARAMETERS Parameters)
Definition: heappage.c:1472
BOOLEAN RtlpPageHeapEnabled
Definition: heappage.c:106
Definition: heap.c:51
ULONG EncodeFlagMask
Definition: heap.h:229
struct _HEAP_ENTRY_EXTRA * PHEAP_ENTRY_EXTRA
HEAP_ENTRY_EXTRA * PHEAP_FREE_ENTRY_EXTRA
Definition: heap.h:305
FORCEINLINE BOOLEAN RtlpHeapIsSpecial(ULONG Flags)
Definition: heap.h:59
struct _HEAP_UCR_DESCRIPTOR HEAP_UCR_DESCRIPTOR