Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into devcontainer-ci-build
Browse files Browse the repository at this point in the history
  • Loading branch information
networkfusion committed Aug 31, 2023
2 parents cbc721c + c37f563 commit 40f454a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/CLR/Core/Cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,11 +575,14 @@ CLR_RT_HeapBlock *CLR_RT_EventCache::Extract_Node(CLR_UINT32 dataType, CLR_UINT3
#if defined(NANOCLR_FORCE_GC_BEFORE_EVERY_ALLOCATION)
return g_CLR_RT_ExecutionEngine.ExtractHeapBlocksForEvents(dataType, flags, blocks);
#else

#if !defined(BUILD_RTM) || defined(VIRTUAL_DEVICE)
if (g_CLR_RT_ExecutionEngine.m_fPerformGarbageCollection)
{
return g_CLR_RT_ExecutionEngine.ExtractHeapBlocksForEvents(dataType, flags, blocks);
}
else
#endif
{
if (blocks > 0 && blocks < c_maxFastLists)
{
Expand Down
4 changes: 4 additions & 0 deletions src/CLR/Core/Execution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1609,11 +1609,15 @@ CLR_RT_HeapBlock *CLR_RT_ExecutionEngine::ExtractHeapBlocks(
PerformGarbageCollection();
}
#else

#if !defined(BUILD_RTM) || defined(VIRTUAL_DEVICE)
if (g_CLR_RT_ExecutionEngine.m_fPerformGarbageCollection)
{
g_CLR_RT_EventCache.EventCache_Cleanup();
PerformGarbageCollection();
}
#endif

#endif

for (int phase = 0;; phase++)
Expand Down
4 changes: 2 additions & 2 deletions src/CLR/Startup/CLRStartup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,12 +440,12 @@ void ClrStartup(CLR_SETTINGS params)
#endif // TARGET_HAS_NANOBOOTER
}
}
#else
#endif

if (params.EnterDebuggerLoopAfterExit)
{
CLR_DBG_Debugger::Debugger_WaitForCommands();
}
#endif
}

// DO NOT USE 'ELSE IF' here because the state can change in Debugger_WaitForCommands() call
Expand Down

0 comments on commit 40f454a

Please sign in to comment.