gc.GenerateReachabilityStressData

gc.GenerateReachabilityStressData

#Overview

name: gc.GenerateReachabilityStressData

This variable is created as a Console Variable (cvar).

It is referenced in 2 C++ source files.

#Summary

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/CoreUObject/Private/UObject/GarbageCollection.cpp:236

Scope: file

Source code excerpt:

}

static FAutoConsoleCommandWithOutputDevice GGenerateReachabilityStressDataCmd(TEXT("gc.GenerateReachabilityStressData"),
		        						      TEXT("Allocate deeply-nested UObject tree to "
						        			   "stress test reachability analysis."),
FConsoleCommandWithOutputDeviceDelegate::CreateStatic(&AllocateReachabilityStressData));

static FAutoConsoleCommandWithOutputDevice GUnlinkReachabilityStressDataCmd(TEXT("gc.UnlinkReachabilityStressData"),
                                 					    TEXT("Unlink previously-generated reachability analysis "

#Loc: <Workspace>/Engine/Source/Runtime/CoreUObject/Private/UObject/GarbageCollectionTesting.cpp:6

Scope: file

Source code excerpt:

/*
	TODO additional features for a future changeset:
	- gc.GenerateReachabilityStressData should have extra arg
	  to specify # of levels in UObject tree
	- gc.GenerateReachabilityStressData should have extra arg
	  to specify whether or not the tree is gc-rooted (to see
		how long it takes to collect)
	- UObjectReachabilityStressData can expose more members to
	  GC to make the token stream bigger
 */

static void GenerateReachabilityStressData(int Levels, UObjectReachabilityStressData* Data);

static int32 CanAllocateMoreUObjects()
{
	const int32 MinAvailableObjectCount = 64 * 1024;
	return GUObjectArray.GetObjectArrayEstimatedAvailable() >= MinAvailableObjectCount;
}

static UObjectReachabilityStressData* ConditionallyAllocateNewStressDataObject()