Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/hx/gc/Immix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7203,7 +7203,16 @@ class GlobalAllocator
{
int oldest = 0;
for(int i=0;i<mAllBlocks.size();i++)
oldest = std::max(oldest, mAllBlocks[i]->maxStartAge());
{
BlockDataInfo *block = mAllBlocks[i];
// Runs between collections, while the zeroing thread may be
// reclaiming or zeroing the block under this lock
int expected = 0;
while (!block->mZeroLock.compare_exchange_weak(expected, 1))
expected = 0;
oldest = std::max(oldest, block->maxStartAge());
block->mZeroLock = 0;
}
return oldest;
}
#endif
Expand Down
Loading