Skip to content

Commit

Permalink
[1.4>master] [MERGE #2533 @leirocks] avoid going through the list whi…
Browse files Browse the repository at this point in the history
…le page heap allocating

Merge pull request #2533 from leirocks:pageheapfix

reduce the chance of hanging
  • Loading branch information
leirocks committed Feb 22, 2017
2 parents f4e9238 + c3e3d35 commit 315fdb7
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lib/Common/Memory/LargeHeapBucket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,8 @@ LargeHeapBucket::PageHeapAlloc(Recycler * recycler, size_t sizeCat, size_t size,
char * memBlock = heapBlock->Alloc(size, attributes);
Assert(memBlock != nullptr);


if (this->largePageHeapBlockList)
{
HeapBlockList::Tail(this->largePageHeapBlockList)->SetNextBlock(heapBlock);
}
else
{
this->largePageHeapBlockList = heapBlock;
}
heapBlock->SetNextBlock(this->largePageHeapBlockList);
this->largePageHeapBlockList = heapBlock;

#if ENABLE_PARTIAL_GC
recycler->autoHeap.uncollectedNewPageCount += pageCount;
Expand Down

0 comments on commit 315fdb7

Please sign in to comment.