SharedMemory::SharedMemory() : mAllocSize(0) , mMappedSize(0) { static Atomic<uint32_t> registered; if (registered.compareExchange(0, 1)) { RegisterStrongMemoryReporter(new ShmemAllocatedReporter()); RegisterStrongMemoryReporter(new ShmemMappedReporter()); } }
SharedMemory::SharedMemory() : mAllocSize(0) , mMappedSize(0) { MOZ_COUNT_CTOR(SharedMemory); static Atomic<bool> registered; if (registered.compareExchange(false, true)) { RegisterStrongMemoryReporter(new ShmemReporter()); } }
/* static */ void BlobImplMemory::DataOwner::EnsureMemoryReporterRegistered() { sDataOwnerMutex.AssertCurrentThreadOwns(); if (sMemoryReporterRegistered) { return; } RegisterStrongMemoryReporter(new BlobImplMemoryDataOwnerMemoryReporter()); sMemoryReporterRegistered = true; }
void InitializeMemoryReporters() { RegisterStrongMemoryReporter(new MemoryReportingMLGPU()); }