Bug 974353 - Add MOZ_COUNT_[CD]TOR to SharedMemory - r=bent

This commit is contained in:
Benoit Jacob 2014-02-26 16:23:51 -05:00
parent 568a0dc03b
commit 3742f9bace
2 changed files with 8 additions and 2 deletions

View File

@ -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());

View File

@ -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;