diff options
Diffstat (limited to 'third_party/base/allocator/partition_allocator/page_allocator.h')
-rw-r--r-- | third_party/base/allocator/partition_allocator/page_allocator.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/third_party/base/allocator/partition_allocator/page_allocator.h b/third_party/base/allocator/partition_allocator/page_allocator.h index be733634c7..aee2532485 100644 --- a/third_party/base/allocator/partition_allocator/page_allocator.h +++ b/third_party/base/allocator/partition_allocator/page_allocator.h @@ -18,6 +18,8 @@ namespace base { #if defined(OS_WIN) static const size_t kPageAllocationGranularityShift = 16; // 64KB +#elif defined(_MIPS_ARCH_LOONGSON) +static const size_t kPageAllocationGranularityShift = 14; // 16KB #else static const size_t kPageAllocationGranularityShift = 12; // 4KB #endif @@ -30,7 +32,12 @@ static const size_t kPageAllocationGranularityBaseMask = // All Blink-supported systems have 4096 sized system pages and can handle // permissions and commit / decommit at this granularity. +// Loongson have 16384 sized system pages. +#if defined(_MIPS_ARCH_LOONGSON) +static const size_t kSystemPageSize = 16384; +#else static const size_t kSystemPageSize = 4096; +#endif static const size_t kSystemPageOffsetMask = kSystemPageSize - 1; static const size_t kSystemPageBaseMask = ~kSystemPageOffsetMask; |