diff --git a/src/CLR/Core/Cache.cpp b/src/CLR/Core/Cache.cpp index 84d8f1734b..06a483fc83 100644 --- a/src/CLR/Core/Cache.cpp +++ b/src/CLR/Core/Cache.cpp @@ -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) { diff --git a/src/CLR/Core/Execution.cpp b/src/CLR/Core/Execution.cpp index 8b2c694c77..f79e98b13e 100644 --- a/src/CLR/Core/Execution.cpp +++ b/src/CLR/Core/Execution.cpp @@ -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++) diff --git a/src/CLR/Startup/CLRStartup.cpp b/src/CLR/Startup/CLRStartup.cpp index 45fb78e255..7f4926ed2b 100644 --- a/src/CLR/Startup/CLRStartup.cpp +++ b/src/CLR/Startup/CLRStartup.cpp @@ -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