MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetMemoryUsage

Method GetMemoryUsage

Source/Engine/Content/Asset.cpp:399–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397#endif
398
399uint64 Asset::GetMemoryUsage() const
400{
401 uint64 result = sizeof(Asset);
402 Locker.Lock();
403 if (Platform::AtomicRead(&_loadingTask))
404 result += sizeof(ContentLoadTask);
405 result += (OnLoaded.Capacity() + OnReloading.Capacity() + OnUnloaded.Capacity()) * sizeof(EventType::FunctionType);
406 result += _references.Capacity() * sizeof(HashSet<IAssetReference*>::Bucket);
407 Locker.Unlock();
408 return result;
409}
410
411void Asset::Reload()
412{

Callers 1

UpdateMethod · 0.45

Calls 4

LockMethod · 0.80
UnlockMethod · 0.80
AtomicReadFunction · 0.50
CapacityMethod · 0.45

Tested by

no test coverage detected