Bug 1932669 - Switch to getpagesize() in Ashmem VolatileBuffer code. r=glandium

This mirrors the OSX code and allows for different Android page sizes.

Differential Revision: https://phabricator.services.mozilla.com/D230320
This commit is contained in:
Ryan VanderMeulen
2024-11-27 14:55:39 +00:00
parent 7b8c030731
commit 2cd4d2d7fc

View File

@@ -114,7 +114,8 @@ size_t VolatileBuffer::NonHeapSizeOfExcludingThis() const {
return 0; return 0;
} }
return (mSize + (PAGE_SIZE - 1)) & PAGE_MASK; size_t pagemask = getpagesize() - 1;
return (mSize + pagemask) & ~pagemask;
} }
} // namespace mozilla } // namespace mozilla