Пример #1
0
SharedMemory::SharedMemory()
  : mAllocSize(0)
  , mMappedSize(0)
{
  static Atomic<uint32_t> registered;
  if (registered.compareExchange(0, 1)) {
    RegisterStrongMemoryReporter(new ShmemAllocatedReporter());
    RegisterStrongMemoryReporter(new ShmemMappedReporter());
  }
}
Пример #2
0
SharedMemory::SharedMemory()
  : mAllocSize(0)
  , mMappedSize(0)
{
  MOZ_COUNT_CTOR(SharedMemory);
  static Atomic<bool> registered;
  if (registered.compareExchange(false, true)) {
    RegisterStrongMemoryReporter(new ShmemReporter());
  }
}
Пример #3
0
/* static */ void
BlobImplMemory::DataOwner::EnsureMemoryReporterRegistered()
{
  sDataOwnerMutex.AssertCurrentThreadOwns();
  if (sMemoryReporterRegistered) {
    return;
  }

  RegisterStrongMemoryReporter(new BlobImplMemoryDataOwnerMemoryReporter());

  sMemoryReporterRegistered = true;
}
Пример #4
0
void
InitializeMemoryReporters()
{
  RegisterStrongMemoryReporter(new MemoryReportingMLGPU());
}