зеркало из https://github.com/mozilla/gecko-dev.git
Bug 974353 - Add MOZ_COUNT_[CD]TOR to SharedMemory - r=bent
This commit is contained in:
Родитель
568a0dc03b
Коммит
3742f9bace
|
@ -48,6 +48,7 @@ SharedMemory::SharedMemory()
|
|||
: mAllocSize(0)
|
||||
, mMappedSize(0)
|
||||
{
|
||||
MOZ_COUNT_CTOR(SharedMemory);
|
||||
static Atomic<bool> registered;
|
||||
if (registered.compareExchange(false, true)) {
|
||||
RegisterStrongMemoryReporter(new ShmemReporter());
|
||||
|
|
|
@ -30,14 +30,19 @@ namespace ipc {
|
|||
class SharedMemory
|
||||
{
|
||||
public:
|
||||
virtual ~SharedMemory()
|
||||
{
|
||||
MOZ_COUNT_DTOR(SharedMemory);
|
||||
Unmapped();
|
||||
Destroyed();
|
||||
}
|
||||
|
||||
enum SharedMemoryType {
|
||||
TYPE_BASIC,
|
||||
TYPE_SYSV,
|
||||
TYPE_UNKNOWN
|
||||
};
|
||||
|
||||
virtual ~SharedMemory() { Unmapped(); Destroyed(); }
|
||||
|
||||
size_t Size() const { return mMappedSize; }
|
||||
|
||||
virtual void* memory() const = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче