[SDK:RTL] Track the end of uncommitted ranges thanks to a "Guard" entry that we put at the end of each committed page

This avoids busy loop to get the last valid entry of the previous committed range when committing a new one.

CORE-15793
This commit is contained in:
Jérôme Gardou 2021-03-05 13:04:52 +01:00 committed by Jérôme Gardou
parent abbc5ba45a
commit 325737f855
2 changed files with 266 additions and 203 deletions

View file

@ -144,6 +144,7 @@ C_ASSERT(sizeof(HEAP_ENTRY) == 16);
C_ASSERT(sizeof(HEAP_ENTRY) == 8);
#endif
C_ASSERT((1 << HEAP_ENTRY_SHIFT) == sizeof(HEAP_ENTRY));
C_ASSERT((2 << HEAP_ENTRY_SHIFT) == sizeof(HEAP_FREE_ENTRY));
typedef struct _HEAP_TAG_ENTRY
{
@ -217,8 +218,7 @@ typedef struct _HEAP_LIST_LOOKUP
ULONG NumberOfUnCommittedRanges; \
USHORT SegmentAllocatorBackTraceIndex; \
USHORT Reserved; \
LIST_ENTRY UCRSegmentList; \
PVOID LastEntryInSegment //FIXME: non-Vista
LIST_ENTRY UCRSegmentList
typedef struct _HEAP
{