예제 #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());
}