PVOID AddressUserData;
/* Add it to the AVL busy nodes table */
+ DphRoot->NodeToAllocate = DphNode;
AddressUserData = RtlInsertElementGenericTableAvl(&DphRoot->BusyNodesTable,
&DphNode->pUserAllocation,
sizeof(ULONG_PTR),
PDPH_HEAP_BLOCK Node)
{
/* Make sure Adjacency list pointers are biased */
- ASSERT(IS_BIASED_POINTER(Node->AdjacencyEntry.Flink));
- ASSERT(IS_BIASED_POINTER(Node->AdjacencyEntry.Blink));
+ //ASSERT(IS_BIASED_POINTER(Node->AdjacencyEntry.Flink));
+ //ASSERT(IS_BIASED_POINTER(Node->AdjacencyEntry.Blink));
/* Remove it from the list */
RemoveEntryList(&Node->AvailableEntry);
DphRoot->nAvailableAllocationBytesCommitted -= Node->nVirtualBlockSize;
/* Remove bias from the AdjacencyEntry pointer */
- POINTER_REMOVE_BIAS(Node->AdjacencyEntry.Flink);
- POINTER_REMOVE_BIAS(Node->AdjacencyEntry.Blink);
+ Node->AdjacencyEntry.Flink = (PLIST_ENTRY)POINTER_REMOVE_BIAS(Node->AdjacencyEntry.Flink);
+ Node->AdjacencyEntry.Blink = (PLIST_ENTRY)POINTER_REMOVE_BIAS(Node->AdjacencyEntry.Blink);
}
VOID NTAPI
}
/* Make sure Adjacency list pointers are biased */
- ASSERT(IS_BIASED_POINTER(Node->AdjacencyEntry.Flink));
- ASSERT(IS_BIASED_POINTER(Node->AdjacencyEntry.Blink));
+ //ASSERT(IS_BIASED_POINTER(Node->AdjacencyEntry.Flink));
+ //ASSERT(IS_BIASED_POINTER(Node->AdjacencyEntry.Blink));
return Node;
}
/* Get pointer to the containing heap root record */
DphRoot = CONTAINING_RECORD(Table, DPH_HEAP_ROOT, BusyNodesTable);
pBlock = DphRoot->NodeToAllocate;
- ASSERT(pBlock == (PDPH_HEAP_BLOCK)(Table+1)); // FIXME: Delete once confirmed
DphRoot->NodeToAllocate = NULL;
ASSERT(pBlock);
DphRoot->Seed = PerfCounter.LowPart;
RtlInitializeCriticalSection(DphRoot->HeapCritSect);
+ InitializeListHead(&DphRoot->AvailableAllocationHead);
/* Create a normal heap for this paged heap */
DphRoot->NormalHeap = RtlCreateHeap(Flags, NULL, TotalSize, CommitSize, NULL, (PRTL_HEAP_PARAMETERS)-1);