mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 974353 - Add MOZ_COUNT_[CD]TOR to SharedMemory - r=bent
This commit is contained in:
parent
568a0dc03b
commit
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;
|
||||
|
Loading…
Reference in New Issue
Block a user