diff --git a/src/coreclr/gc/gcimpl.h b/src/coreclr/gc/gcimpl.h index 8dcf062889c85e..208a6860308494 100644 --- a/src/coreclr/gc/gcimpl.h +++ b/src/coreclr/gc/gcimpl.h @@ -60,7 +60,7 @@ class GCHeap : public IGCHeapInternal friend void GCProfileWalkHeap(bool etwOnly); public: - //In order to keep gc.cpp cleaner, ugly EE specific code is relegated to methods. + // In order to keep gc.cpp cleaner, ugly EE specific code is relegated to methods. static void UpdatePreGCCounters(); static void UpdatePostGCCounters(); @@ -131,7 +131,7 @@ class GCHeap : public IGCHeapInternal int CollectionCount (int generation, int get_bgc_fgc_count = 0); - // promote an object + // Promote an object PER_HEAP_ISOLATED void Promote (Object** object, ScanContext* sc, uint32_t flags=0); @@ -144,16 +144,16 @@ class GCHeap : public IGCHeapInternal HRESULT Init (size_t heapSize); - //Register an object for finalization + // Register an object for finalization bool RegisterForFinalization (int gen, Object* obj); - //Unregister an object for finalization + // Unregister an object for finalization void SetFinalizationRun (Object* obj); - // returns the generation number of an object (not valid during relocation) or + // Returns the generation number of an object (not valid during relocation) or // INT32_MAX if the object belongs to a non-GC heap. unsigned WhichGeneration (Object* object); - // returns TRUE is the object is ephemeral + // Returns TRUE if the object is ephemeral bool IsEphemeral (Object* object); bool IsHeapPointer (void* object, bool small_heap_only = false); @@ -230,10 +230,10 @@ class GCHeap : public IGCHeapInternal PER_HEAP_ISOLATED BOOL GcCollectClasses; PER_HEAP_ISOLATED - VOLATILE(BOOL) GcInProgress; // used for syncing w/GC + VOLATILE(BOOL) GcInProgress; // Used for syncing w/GC PER_HEAP_ISOLATED VOLATILE(unsigned) GcCount; PER_HEAP_ISOLATED unsigned GcCondemnedGeneration; - // calculated at the end of a GC. + // Calculated at the end of a GC. PER_HEAP_ISOLATED size_t totalSurvivedSize; // Use only for GC tracing. @@ -243,7 +243,7 @@ class GCHeap : public IGCHeapInternal // Interface with gc_heap size_t GarbageCollectTry (int generation, BOOL low_memory_p=FALSE, int mode=collection_blocking); - // frozen segment management functions + // Frozen segment management functions virtual segment_handle RegisterFrozenSegment(segment_info *pseginfo); virtual void UnregisterFrozenSegment(segment_handle seg); virtual bool IsInFrozenSegment(Object *object); @@ -264,7 +264,7 @@ class GCHeap : public IGCHeapInternal void TemporaryDisableConcurrentGC(); bool IsConcurrentGCEnabled(); - PER_HEAP_ISOLATED GCEvent *WaitForGCEvent; // used for syncing w/GC + PER_HEAP_ISOLATED GCEvent *WaitForGCEvent; // Used for syncing w/GC PER_HEAP_ISOLATED CFinalize* m_Finalize; @@ -280,18 +280,19 @@ class GCHeap : public IGCHeapInternal return g_fSuspensionPending == 0; } public: - //return TRUE if GC actually happens, otherwise FALSE + + // Returns TRUE if GC actually happens, otherwise FALSE bool StressHeap(gc_alloc_context * acontext); #ifndef FEATURE_NATIVEAOT // NativeAOT forces relocation a different way #ifdef STRESS_HEAP protected: - // only used in BACKGROUND_GC, but the symbol is not defined yet... + // Only used in BACKGROUND_GC, but the symbol is not defined yet... PER_HEAP_ISOLATED int gc_stress_fgcs_in_bgc; #if !defined(MULTIPLE_HEAPS) - // handles to hold the string objects that will force GC movement + // Handles to hold the string objects that will force GC movement enum { NUM_HEAP_STRESS_OBJS = 8 }; PER_HEAP OBJECTHANDLE m_StressObjs[NUM_HEAP_STRESS_OBJS]; PER_HEAP int m_CurStressObj; diff --git a/src/coreclr/vm/gcstress.h b/src/coreclr/vm/gcstress.h index 377ffe984cf133..b1eccb02c56097 100644 --- a/src/coreclr/vm/gcstress.h +++ b/src/coreclr/vm/gcstress.h @@ -34,7 +34,7 @@ struct alloc_context; enum gcs_trigger_points { - // generic handling based on EEConfig settings + // Generic handling based on EEConfig settings cfg_any, // any bit set in EEConfig::iGCStress cfg_alloc, // trigger on GC allocations cfg_transition, // trigger on transitions @@ -44,7 +44,7 @@ enum gcs_trigger_points { cfg_instr, // trigger on managed instructions (JITted or NGENed) cfg_last, // boundary - // special handling at particular trigger points + // Special handling at particular trigger points jit_on_create_jump_stub, jit_on_create_il_stub, gc_on_alloc, @@ -140,7 +140,7 @@ namespace _GCStress #ifdef STRESS_HEAP - // Support classes to allow easy customization of GC Stress policies + // Support classes to allow easy customization of GC stress policies namespace detail { using namespace mpl; @@ -164,7 +164,7 @@ namespace _GCStress > struct GetPolicy, DefPolicy, Traits> { - // is true if HeadT and DefPolicy evaluate to the same tag, + // Is true if HeadT and DefPolicy evaluate to the same tag, // through Traits<> static const bool sameTag = std::is_same< typename Traits::tag, @@ -193,7 +193,7 @@ namespace _GCStress // GC stress specific EEConfig accessors namespace detail { - // no definition provided so that absence of concrete implementations cause compiler errors + // No definition provided so that absence of concrete implementations causes compiler errors template bool IsEnabled(); @@ -274,7 +274,7 @@ namespace _GCStress class CoopGcModePolicy { #ifndef DACCESS_COMPILE - // implicit constructor an destructor will do the right thing + // Implicit constructor and destructor will do the right thing GCCoop m_coop; #endif // DACCESS_COMPILE