38# define NOALLOC_SCOPE_CYCLE_COUNTER(Stat) FNoAllocScopeCycleCounter NoAllocCycleCounter_##Stat(#Stat)
40# define NOALLOC_SCOPE_CYCLE_COUNTER(Stat)
45 template<
int NumSmallPools>
55 if (!FPlatformAtomics::InterlockedCompareExchangePointer((
void**)&Bundles[
InPoolIndex].FreeBundles[Slot],
InBundle,
nullptr))
72 if (FPlatformAtomics::InterlockedCompareExchangePointer((
void**)&Bundles[
InPoolIndex].FreeBundles[Slot],
nullptr, Result) == Result)
91 static_assert(
sizeof(FBundlePointer) ==
PLATFORM_CACHE_LINE_SIZE,
"FBundlePointer should be the same size as a cache line");
100 template <
class AllocType>
107 for (
int32 PoolIndex = 0; PoolIndex != AllocType::NUM_SMALL_POOLS; ++PoolIndex)
109 typename AllocType::FBundleNode* Bundles =
FreeBlockLists->PopBundles(PoolIndex);
112 Allocator.FreeBundles(Bundles, PoolIndex);
118 template <
class AllocType>
121 if (
typename AllocType::FPerThreadFreeBlockLists* Lists = AllocType::FPerThreadFreeBlockLists::Get())
140 template <
class AllocType>
144 Allocator.MemoryTrimEpoch.fetch_add(1, std::memory_order_relaxed);
153 for (
typename AllocType::FPerThreadFreeBlockLists*
BlockList : AllocType::GetRegisteredFreeBlockLists())
161 if (
BlockList->UpdateEpoch(
Allocator.MemoryTrimEpoch.load(std::memory_order_relaxed)))
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
int32 GCycleStatsShouldEmitNamedEvents
Definition CoreGlobals.cpp:462
#define QUICK_SCOPE_CYCLE_COUNTER(Stat)
Definition Stats.h:652
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define TRACE_CPUPROFILER_EVENT_SCOPE(Name)
Definition CpuProfilerTrace.h:528
#define UE_LOG(CategoryName, Verbosity, Format,...)
Definition LogMacros.h:270
float GMallocBinnedFlushThreadCacheMaxWaitTime
Definition MallocBinnedCommon.cpp:539
int32 GMallocBinnedFlushRegisteredThreadCachesOnOneThread
Definition MallocBinnedCommon.cpp:547
#define UE_DEFAULT_GMallocBinnedMaxBundlesBeforeRecycle
Definition MallocBinnedCommon.h:66
#define GMallocBinnedMaxBundlesBeforeRecycle
Definition MallocBinnedCommon.h:83
static CORE_API bool ShouldUseThreadingForPerformance()
Definition App.cpp:300
Definition MallocBinnedCommonUtils.h:98
static void TrimThreadFreeBlockLists(AllocType &Allocator, typename AllocType::FPerThreadFreeBlockLists *FreeBlockLists)
Definition MallocBinnedCommonUtils.h:101
static void FlushCurrentThreadCache(AllocType &Allocator, bool bNewEpochOnly=false)
Definition MallocBinnedCommonUtils.h:119
static void Trim(AllocType &Allocator)
Definition MallocBinnedCommonUtils.h:141
static void BroadcastSlow_OnlyUseForSpecialPurposes(bool bDoTaskThreads, bool bDoBackgroundThreads, TFunction< void(ENamedThreads::Type CurrentThread)> &Callback)
Definition TaskGraph.cpp:1897
Definition AndroidPlatformMisc.h:14
Definition UniqueLock.h:20
Type
Definition TaskGraphInterfaces.h:57
Definition MallocBinnedCommonUtils.h:44
static double Seconds()
Definition AndroidPlatformTime.h:20
Definition MallocBinnedCommon.h:188
Definition MallocBinnedCommonUtils.h:47
FMallocBinnedCommonBase::FBundleNode * PopBundle(uint32 InPoolIndex)
Definition MallocBinnedCommonUtils.h:64
bool PushBundle(uint32 InPoolIndex, FMallocBinnedCommonBase::FBundleNode *InBundle)
Definition MallocBinnedCommonUtils.h:48