Skip to content
Merged
Show file tree
Hide file tree
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
27 changes: 14 additions & 13 deletions src/coreclr/gc/gcimpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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);
Expand All @@ -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);

Expand Down Expand Up @@ -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.
Expand All @@ -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);
Expand All @@ -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;

Expand All @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions src/coreclr/vm/gcstress.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down Expand Up @@ -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;
Expand All @@ -164,7 +164,7 @@ namespace _GCStress
>
struct GetPolicy<type_list<HeadT, TailT>, 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<HeadT>::tag,
Expand Down Expand Up @@ -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 <enum gcs_trigger_points>
bool IsEnabled();

Expand Down Expand Up @@ -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

Expand Down
Loading