Skip to content

Commit 9664bd9

Browse files
committed
Fix ASSERT in GC heap compact
- Fix compiler define conditional. - Fix assert for move size.
1 parent d75818f commit 9664bd9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CLR/Core/GarbageCollector_Compaction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,13 @@ void CLR_RT_GarbageCollector::Heap_Compact()
256256

257257
freeRegion->Unlink();
258258

259-
#ifdef _DEBUG
259+
#ifdef DEBUG
260260

261261
_ASSERTE(relocCurrent->m_destination >= (CLR_UINT8 *)g_CLR_RT_ExecutionEngine.m_heap.FirstNode());
262262
_ASSERTE(relocCurrent->m_destination < (CLR_UINT8 *)g_CLR_RT_ExecutionEngine.m_heap.LastNode());
263263
_ASSERTE(relocCurrent->m_start >= (CLR_UINT8 *)g_CLR_RT_ExecutionEngine.m_heap.FirstNode());
264264
_ASSERTE(relocCurrent->m_start < (CLR_UINT8 *)g_CLR_RT_ExecutionEngine.m_heap.LastNode());
265-
_ASSERTE(moveBytes <= freeRegion_Size);
265+
_ASSERTE(moveBytes <= (move * sizeof(CLR_RT_HeapBlock)));
266266

267267
#endif
268268

0 commit comments

Comments
 (0)