| Index: base/memory/discardable_memory_android.cc
|
| diff --git a/base/memory/discardable_memory_android.cc b/base/memory/discardable_memory_android.cc
|
| index 6f531447f6d2b71a628967a8de6b3bcb7c2ffce0..2004a360b0c980be7068012500b53ee98ec137a6 100644
|
| --- a/base/memory/discardable_memory_android.cc
|
| +++ b/base/memory/discardable_memory_android.cc
|
| @@ -37,8 +37,7 @@ struct DiscardableMemoryAllocatorWrapper {
|
| static size_t GetOptimalAshmemRegionSizeForAllocator() {
|
| // Note that this may do some I/O (without hitting the disk though) so it
|
| // should not be called on the critical path.
|
| - return internal::AlignToNextPage(
|
| - base::android::SysUtils::AmountOfPhysicalMemoryKB() * 1024 / 8);
|
| + return base::android::SysUtils::AmountOfPhysicalMemoryKB() * 1024 / 8;
|
| }
|
| };
|
|
|
| @@ -49,15 +48,6 @@ LazyInstance<DiscardableMemoryAllocatorWrapper>::Leaky g_context =
|
|
|
| namespace internal {
|
|
|
| -size_t AlignToNextPage(size_t size) {
|
| - const size_t kPageSize = 4096;
|
| - DCHECK_EQ(static_cast<int>(kPageSize), getpagesize());
|
| - if (size > std::numeric_limits<size_t>::max() - kPageSize + 1)
|
| - return 0;
|
| - const size_t mask = ~(kPageSize - 1);
|
| - return (size + kPageSize - 1) & mask;
|
| -}
|
| -
|
| bool CreateAshmemRegion(const char* name,
|
| size_t size,
|
| int* out_fd,
|
|
|