Bug 605362, part 4: Notify shmem MemoryReporters from all shmem backends. r=joe

This commit is contained in:
Chris Jones
2010-11-05 02:17:07 -05:00
parent 82f39aaa48
commit 18be5825d9
3 changed files with 29 additions and 6 deletions

View File

@@ -108,6 +108,7 @@ SharedMemoryBasic::Create(size_t aNbytes)
mShmFd = shmfd;
mAllocSize = aNbytes;
Created(aNbytes);
return true;
}
@@ -128,6 +129,7 @@ SharedMemoryBasic::Map(size_t nBytes)
}
mSize = nBytes;
Mapped(nBytes);
return true;
}
@@ -160,6 +162,7 @@ SharedMemoryBasic::Unmap()
}
mMemory = nsnull;
mSize = 0;
Unmapped(mSize);
}
void
@@ -167,6 +170,9 @@ SharedMemoryBasic::Destroy()
{
if (mShmFd > 0) {
close(mShmFd);
if (mAllocSize) {
Destroyed(mAllocSize);
}
}
}