ReactOS  0.4.14-dev-323-g6fe6a88
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_FREELISTS 128
16 #define HEAP_SEGMENTS 64
17 
18 #define HEAP_ENTRY_SIZE ((ULONG)sizeof(HEAP_ENTRY))
19 #ifdef _WIN64
20 #define HEAP_ENTRY_SHIFT 4
21 #else
22 #define HEAP_ENTRY_SHIFT 3
23 #endif
24 #define HEAP_MAX_BLOCK_SIZE ((0x80000 - PAGE_SIZE) >> HEAP_ENTRY_SHIFT)
25 
26 #define ARENA_INUSE_FILLER 0xBAADF00D
27 #define ARENA_FREE_FILLER 0xFEEEFEEE
28 #define HEAP_TAIL_FILL 0xab
29 
30 // from ntifs.h, should go to another header!
31 #define HEAP_GLOBAL_TAG 0x0800
32 #define HEAP_PSEUDO_TAG_FLAG 0x8000
33 #define HEAP_TAG_MASK (HEAP_MAXIMUM_TAG << HEAP_TAG_SHIFT)
34 #define HEAP_TAGS_MASK (HEAP_TAG_MASK ^ (0xFF << HEAP_TAG_SHIFT))
35 
36 #define HEAP_EXTRA_FLAGS_MASK (HEAP_CAPTURE_STACK_BACKTRACES | \
37  HEAP_SETTABLE_USER_VALUE | \
38  HEAP_TAGS_MASK)
39 
40 /* Heap entry flags */
41 #define HEAP_ENTRY_BUSY 0x01
42 #define HEAP_ENTRY_EXTRA_PRESENT 0x02
43 #define HEAP_ENTRY_FILL_PATTERN 0x04
44 #define HEAP_ENTRY_VIRTUAL_ALLOC 0x08
45 #define HEAP_ENTRY_LAST_ENTRY 0x10
46 #define HEAP_ENTRY_SETTABLE_FLAG1 0x20
47 #define HEAP_ENTRY_SETTABLE_FLAG2 0x40
48 #define HEAP_ENTRY_SETTABLE_FLAG3 0x80
49 #define HEAP_ENTRY_SETTABLE_FLAGS (HEAP_ENTRY_SETTABLE_FLAG1 | HEAP_ENTRY_SETTABLE_FLAG2 | HEAP_ENTRY_SETTABLE_FLAG3)
50 
51 /* Signatures */
52 #define HEAP_SIGNATURE 0xeefeeff
53 #define HEAP_SEGMENT_SIGNATURE 0xffeeffee
54 
55 /* Segment flags */
56 #define HEAP_USER_ALLOCATED 0x1
57 
58 /* A handy inline to distinguis normal heap, special "debug heap" and special "page heap" */
61 {
63 
69  {
70  /* This is a special heap */
71  return TRUE;
72  }
73 
74  /* No need for a special treatment */
75  return FALSE;
76 }
77 
78 /* Heap structures */
80 {
81 #ifdef _M_AMD64
82  PVOID PreviousBlockPrivateData;
83 #endif
84  union
85  {
86  struct
87  {
91  };
92  struct
93  {
94 #ifndef _M_AMD64
96 #else
97  ULONG SubSegmentCodeDummy;
98 #endif
100  union
101  {
104  };
106  };
107  struct
108  {
111  };
112  struct
113  {
118  };
119  struct
120  {
125  };
127  };
128 };
129 
130 typedef struct _HEAP_FREE_ENTRY
131 {
135 
136 typedef struct _HEAP_ENTRY
137 {
138  struct _HEAP_COMMON_ENTRY;
140 
141 #ifdef _WIN64
142 C_ASSERT(sizeof(HEAP_ENTRY) == 16);
143 #else
144 C_ASSERT(sizeof(HEAP_ENTRY) == 8);
145 #endif
146 C_ASSERT((1 << HEAP_ENTRY_SHIFT) == sizeof(HEAP_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 typedef struct _HEAP
207 {
212  struct _HEAP *Heap;
222 
245  LIST_ENTRY UCRSegments; // FIXME: non-Vista
250  struct _HEAP_SEGMENT *Segments[HEAP_SEGMENTS]; //FIXME: non-Vista
253  PVOID BlocksIndex; // HEAP_LIST_LOOKUP
256  LIST_ENTRY FreeLists[HEAP_FREELISTS]; //FIXME: non-Vista
257  //LIST_ENTRY FreeLists;
258  union
259  {
260  ULONG FreeListsInUseUlong[HEAP_FREELISTS / (sizeof(ULONG) * 8)]; //FIXME: non-Vista
261  UCHAR FreeListsInUseBytes[HEAP_FREELISTS / (sizeof(UCHAR) * 8)]; //FIXME: non-Vista
262  } u;
270 } HEAP, *PHEAP;
271 
272 typedef struct _HEAP_SEGMENT
273 {
289 
290 typedef struct _HEAP_UCR_DESCRIPTOR
291 {
297 
298 typedef struct _HEAP_UCR_SEGMENT
299 {
304 
305 typedef struct _HEAP_ENTRY_EXTRA
306 {
307  union
308  {
309  struct
310  {
314  };
316  };
318 
320 
322 {
329 
330 /* Global variables */
333 
334 /* Functions declarations */
335 
336 /* heap.c */
339  PHEAP_FREE_ENTRY FreeEntry,
340  PSIZE_T FreeSize,
341  BOOLEAN Remove);
342 
345 
347 RtlpValidateHeap(PHEAP Heap, BOOLEAN ForceValidation);
348 
350 RtlpValidateHeapEntry(PHEAP Heap, PHEAP_ENTRY HeapEntry);
351 
353 RtlpValidateHeapHeaders(PHEAP Heap, BOOLEAN Recalculate);
354 
355 /* heapdbg.c */
358  PVOID Addr,
359  SIZE_T TotalSize,
361  PVOID Lock,
363 
365 RtlDebugDestroyHeap(HANDLE HeapPtr);
366 
367 PVOID NTAPI
369  ULONG Flags,
370  SIZE_T Size);
371 
372 PVOID NTAPI
374  ULONG Flags,
375  PVOID Ptr,
376  SIZE_T Size);
377 
379 RtlDebugFreeHeap(HANDLE HeapPtr,
380  ULONG Flags,
381  PVOID Ptr);
382 
384 RtlDebugGetUserInfoHeap(PVOID HeapHandle,
385  ULONG Flags,
387  PVOID *UserValue,
388  PULONG UserFlags);
389 
392  ULONG Flags,
394  PVOID UserValue);
395 
396 BOOLEAN
397 NTAPI
399  ULONG Flags,
401  ULONG UserFlagsReset,
402  ULONG UserFlagsSet);
403 
405 RtlDebugSizeHeap(HANDLE HeapPtr,
406  ULONG Flags,
407  PVOID Ptr);
408 
409 /* heappage.c */
410 
413  PVOID Addr,
414  SIZE_T TotalSize,
416  PVOID Lock,
418 
419 PVOID NTAPI
420 RtlpPageHeapDestroy(HANDLE HeapPtr);
421 
422 PVOID NTAPI
424  IN ULONG Flags,
425  IN SIZE_T Size);
426 
428 RtlpPageHeapFree(HANDLE HeapPtr,
429  ULONG Flags,
430  PVOID Ptr);
431 
432 PVOID NTAPI
434  ULONG Flags,
435  PVOID Ptr,
436  SIZE_T Size);
437 
439 RtlpPageHeapLock(HANDLE HeapPtr);
440 
442 RtlpPageHeapUnlock(HANDLE HeapPtr);
443 
445 RtlpPageHeapGetUserInfo(PVOID HeapHandle,
446  ULONG Flags,
448  PVOID *UserValue,
449  PULONG UserFlags);
450 
453  ULONG Flags,
455  PVOID UserValue);
456 
457 BOOLEAN
458 NTAPI
460  ULONG Flags,
462  ULONG UserFlagsReset,
463  ULONG UserFlagsSet);
464 
465 BOOLEAN
466 NTAPI
468  ULONG Flags,
469  PVOID Block);
470 
472 RtlpPageHeapSize(HANDLE HeapPtr,
473  ULONG Flags,
474  PVOID Ptr);
475 
476 VOID
477 NTAPI
479 
480 VOID
481 NTAPI
483 
484 VOID
485 NTAPI
487 
488 #endif
ULONG SegmentFlags
Definition: heap.h:210
PVOID BlocksIndex
Definition: heap.h:253
ULONG_PTR Settable
Definition: heap.h:313
LIST_ENTRY Entry
Definition: heap.h:323
USHORT Reserved
Definition: heap.h:286
PRTL_HEAP_COMMIT_ROUTINE CommitRoutine
Definition: heap.h:264
ULONG ItemCount
Definition: heap.h:198
ULONG SegmentSignature
Definition: heap.h:209
struct _HEAP_TUNING_PARAMETERS * PHEAP_TUNING_PARAMETERS
LIST_ENTRY SegmentList
Definition: heap.h:249
BOOLEAN NTAPI RtlDebugSetUserFlagsHeap(PVOID HeapHandle, ULONG Flags, PVOID BaseAddress, ULONG UserFlagsReset, ULONG UserFlagsSet)
Definition: heapdbg.c:431
ULONG NumberOfUnCommittedRanges
Definition: heap.h:284
LIST_ENTRY SegmentListEntry
Definition: heap.h:211
#define IN
Definition: typedefs.h:38
ULONG InBlockDeccommits
Definition: heap.h:183
Definition: heap.h:321
ULONG InBlockCommitFailures
Definition: heap.h:180
#define TRUE
Definition: types.h:120
struct _HEAP_TAG_ENTRY * PHEAP_TAG_ENTRY
UCHAR FreeListsInUseBytes[HEAP_FREELISTS/(sizeof(UCHAR) *8)]
Definition: heap.h:261
UCHAR Flags
Definition: heap.h:89
PVOID SubSegmentCode
Definition: heap.h:95
struct _HEAP_FREE_ENTRY HEAP_FREE_ENTRY
SIZE_T TotalFreeSize
Definition: heap.h:236
ULONG Frees
Definition: heap.h:151
PHEAP_ENTRY LastValidEntry
Definition: heap.h:216
#define HEAP_SEGMENTS
Definition: heap.h:16
struct _HEAP_UCR_DESCRIPTOR * PHEAP_UCR_DESCRIPTOR
struct _HEAP_SEGMENT HEAP_SEGMENT
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:980
PVOID BaseAddress
Definition: heap.h:213
BOOLEAN NTAPI RtlpValidateHeapHeaders(PHEAP Heap, BOOLEAN Recalculate)
Definition: heap.c:3144
HEAP_ENTRY Entry
Definition: heap.h:274
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
struct _HEAP_COUNTERS * PHEAP_COUNTERS
PVOID FrontEndHeap
Definition: heap.h:265
SIZE_T MaximumAllocationSize
Definition: heap.h:237
union _HEAP::@4024 u
USHORT TagIndex
Definition: heap.h:312
ULONG Signature
Definition: heap.h:231
USHORT NextAvailableTagIndex
Definition: heap.h:241
USHORT Size
Definition: heap.h:88
LIST_ENTRY FreeList
Definition: heap.h:132
UCHAR Code4
Definition: heap.h:124
ULONG VirtualMemoryThreshold
Definition: heap.h:230
USHORT FrontHeapLockCount
Definition: heap.h:266
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:228
BOOLEAN NTAPI RtlpValidateHeap(PHEAP Heap, BOOLEAN ForceValidation)
Definition: heap.c:3397
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:240
ULONG FreeListsInUseUlong[HEAP_FREELISTS/(sizeof(ULONG) *8)]
Definition: heap.h:260
ULONG Code1
Definition: heap.h:121
BOOLEAN NTAPI RtlpPageHeapLock(HANDLE HeapPtr)
Definition: heappage.c:2354
ULONG InterceptorValue
Definition: heap.h:114
#define HEAP_CREATE_ENABLE_TRACING
Definition: nt_native.h:1702
struct _HEAP_TAG_ENTRY HEAP_TAG_ENTRY
struct _HEAP * Heap
Definition: heap.h:212
uint32_t ULONG_PTR
Definition: typedefs.h:63
struct _HEAP_SEGMENT * Segments[HEAP_SEGMENTS]
Definition: heap.h:250
ULONG NumberOfPages
Definition: heap.h:214
ULONG SegmentFlags
Definition: heap.h:276
SIZE_T ReservedSize
Definition: heap.h:301
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
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
PHEAP Heap
Definition: heap.h:278
ULONG_PTR * PSIZE_T
Definition: typedefs.h:78
ULONG_PTR AlignMask
Definition: heap.h:247
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
SIZE_T ReserveSize
Definition: heap.h:326
Definition: heap.h:305
USHORT HeaderValidateLength
Definition: heap.h:239
UCHAR SegmentOffset
Definition: heap.h:102
ULONG BaseIndex
Definition: heap.h:200
PHEAP_LOCK LockVariable
Definition: heap.h:263
PHEAP_PSEUDO_TAG_ENTRY PseudoTagEntries
Definition: heap.h:255
HEAP_ENTRY Encoding
Definition: heap.h:227
ULONG ArraySize
Definition: heap.h:196
UCHAR ExtendedBlockSignature
Definition: heap.h:117
ULONG Allocs
Definition: heap.h:160
ULONG LockCollisions
Definition: heap.h:176
Definition: heap.h:79
LIST_ENTRY SegmentListEntry
Definition: heap.h:277
Definition: heap.h:130
unsigned char BOOLEAN
ULONG DecommittRate
Definition: heap.h:178
struct _HEAP_ENTRY * PHEAP_ENTRY
UCHAR Code3
Definition: heap.h:123
PHEAP_ENTRY FirstEntry
Definition: heap.h:215
struct _HEAP_UCR_SEGMENT HEAP_UCR_SEGMENT
BOOLEAN NTAPI RtlDebugFreeHeap(HANDLE HeapPtr, ULONG Flags, PVOID Ptr)
Definition: heapdbg.c:267
#define FORCEINLINE
Definition: ntbasedef.h:221
_In_ BOOLEAN Remove
Definition: psfuncs.h:110
SIZE_T CommittedSize
Definition: heap.h:302
ULONG CommitRate
Definition: heap.h:177
#define HEAP_VALIDATE_PARAMETERS_ENABLED
Definition: rtltypes.h:167
#define HEAP_ENTRY_SHIFT
Definition: heap.h:22
USHORT PreviousSize
Definition: heap.h:99
ULONG SegmentSignature
Definition: heap.h:275
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:252
PVOID NTAPI RtlDebugReAllocateHeap(HANDLE HeapPtr, ULONG Flags, PVOID Ptr, SIZE_T Size)
Definition: heapdbg.c:195
HEAP_TUNING_PARAMETERS TuningParameters
Definition: heap.h:269
ULONG Allocs
Definition: heap.h:150
USHORT SegmentAllocatorBackTraceIndex
Definition: heap.h:219
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
LIST_ENTRY UCRSegmentList
Definition: heap.h:287
struct _HEAP_PSEUDO_TAG_ENTRY HEAP_PSEUDO_TAG_ENTRY
ULONG CompactHeapCalls
Definition: heap.h:181
SIZE_T CommitSize
Definition: heap.h:325
ULONG CommittThresholdShift
Definition: heap.h:189
UCHAR FrontEndHeapType
Definition: heap.h:267
__wchar_t WCHAR
Definition: xmlstorage.h:180
LIST_ENTRY UCRSegments
Definition: heap.h:245
uint64_t ULONGLONG
Definition: typedefs.h:65
#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
USHORT SegmentAllocatorBackTraceIndex
Definition: heap.h:285
ULONG CommittOps
Definition: heap.h:173
USHORT UnusedBytesLength
Definition: heap.h:115
LIST_ENTRY VirtualAllocdBlocks
Definition: heap.h:248
ULONG ExtraItem
Definition: heap.h:197
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:311
HEAP_COUNTERS Counters
Definition: heap.h:268
UCHAR UnusedBytes
Definition: heap.h:105
struct _HEAP_UCR_SEGMENT * PHEAP_UCR_SEGMENT
VOID NTAPI RtlpRemoveHeapFromProcessList(PHEAP Heap)
Definition: heapuser.c:56
USHORT ContextValue
Definition: heap.h:110
#define HEAP_FREELISTS
Definition: heap.h:15
struct _HEAP HEAP
unsigned char UCHAR
Definition: xmlstorage.h:181
LIST_ENTRY SegmentEntry
Definition: heap.h:293
PHEAP_TAG_ENTRY TagEntries
Definition: heap.h:243
ULONG Frees
Definition: heap.h:161
_In_ PPCI_DEVICE_PRESENCE_PARAMETERS Parameters
Definition: iotypes.h:872
ULONG NumberOfPages
Definition: heap.h:280
VOID NTAPI RtlpAddHeapToProcessList(PHEAP Heap)
Definition: heapuser.c:23
ULONG CompactedUCRs
Definition: heap.h:182
LIST_ENTRY UCRList
Definition: heap.h:244
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:117
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment IN PNDIS_RW_LOCK Lock
Definition: CrNtStubs.h:75
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
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
PHEAP_ENTRY_EXTRA NTAPI RtlpGetExtraStuffPointer(PHEAP_ENTRY HeapEntry)
Definition: heap.c:2526
USHORT MaximumTagIndex
Definition: heap.h:242
USHORT CreatorBackTraceIndex
Definition: heap.h:154
PHEAP_ENTRY LastValidEntry
Definition: heap.h:282
ULONG NumberOfUnCommittedPages
Definition: heap.h:283
SIZE_T NTAPI RtlpPageHeapSize(HANDLE HeapPtr, ULONG Flags, PVOID Ptr)
Definition: heappage.c:2249
LIST_ENTRY ListEntry
Definition: heap.h:292
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:225
LIST_ENTRY UCRSegmentList
Definition: heap.h:221
BOOLEAN NTAPI RtlpValidateHeapEntry(PHEAP Heap, PHEAP_ENTRY HeapEntry)
Definition: heap.c:3153
SIZE_T TotalMemoryLargeUCR
Definition: heap.h:169
ULONG_PTR SIZE_T
Definition: typedefs.h:78
USHORT AllocatorBackTraceIndex
Definition: heap.h:251
PVOID UCRIndex
Definition: heap.h:254
ULONG_PTR AlignRound
Definition: heap.h:246
ULONG NumberOfUnCommittedPages
Definition: heap.h:217
Definition: heap.h:136
SIZE_T SegmentReserve
Definition: heap.h:232
unsigned short USHORT
Definition: pedump.c:61
SIZE_T TotalMemoryReserved
Definition: heap.h:167
ULONG Flags
Definition: heap.h:223
BOOLEAN NTAPI RtlpPageHeapSetUserFlags(PVOID HeapHandle, ULONG Flags, PVOID BaseAddress, ULONG UserFlagsReset, ULONG UserFlagsSet)
Definition: heappage.c:2207
USHORT ProcessHeapsListIndex
Definition: heap.h:238
SIZE_T MaxPreCommittThreshold
Definition: heap.h:190
USHORT FunctionIndex
Definition: heap.h:109
USHORT TagIndex
Definition: heap.h:153
struct _HEAP_ENTRY_EXTRA HEAP_ENTRY_EXTRA
SIZE_T SegmentCommit
Definition: heap.h:233
SIZE_T Size
Definition: heap.h:162
unsigned int * PULONG
Definition: retypes.h:1
USHORT Code2
Definition: heap.h:122
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:324
SIZE_T DeCommitFreeBlockThreshold
Definition: heap.h:234
ULONG TotalUCRs
Definition: heap.h:172
UCHAR LFHFlags
Definition: heap.h:103
unsigned int ULONG
Definition: retypes.h:1
UINT64 ZeroInit
Definition: heap.h:315
UCHAR SmallTagIndex
Definition: heap.h:90
PHEAP_ENTRY FirstEntry
Definition: heap.h:281
ULONG ForceFlags
Definition: heap.h:224
HEAP_ENTRY BusyBlock
Definition: heap.h:327
LIST_ENTRY ListEntry
Definition: heap.h:300
#define HEAP_CAPTURE_STACK_BACKTRACES
Definition: rtltypes.h:164
HEAP_ENTRY Entry
Definition: heap.h:208
USHORT Reserved
Definition: heap.h:220
ULONGLONG AgregateCode
Definition: heap.h:126
unsigned long long UINT64
ULONG NumberOfUnCommittedRanges
Definition: heap.h:218
struct _HEAP_LIST_LOOKUP * PHEAP_LIST_LOOKUP
UCHAR EntryOffset
Definition: heap.h:116
SIZE_T DeCommitTotalFreeThreshold
Definition: heap.h:235
BOOLEAN NTAPI RtlpPageHeapFree(HANDLE HeapPtr, ULONG Flags, PVOID Ptr)
Definition: heappage.c:1862
VOID NTAPI RtlInitializeHeapManager(VOID)
Definition: libsupp.c:243
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:319
struct _HEAP_COUNTERS HEAP_COUNTERS
C_ASSERT(sizeof(HEAP_ENTRY)==8)
ULONG Interceptor
Definition: heap.h:229
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
LIST_ENTRY FreeLists[HEAP_FREELISTS]
Definition: heap.h:256
Definition: heap.c:51
PVOID BaseAddress
Definition: heap.h:279
ULONG EncodeFlagMask
Definition: heap.h:226
struct _HEAP_ENTRY_EXTRA * PHEAP_ENTRY_EXTRA
HEAP_ENTRY_EXTRA * PHEAP_FREE_ENTRY_EXTRA
Definition: heap.h:319
FORCEINLINE BOOLEAN RtlpHeapIsSpecial(ULONG Flags)
Definition: heap.h:60
struct _HEAP_UCR_DESCRIPTOR HEAP_UCR_DESCRIPTOR