Advertisement
Guest User

Untitled

a guest
Dec 23rd, 2021
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. diff --git a/base/allocator/partition_allocator/page_allocator_constants.h b/base/allocator/partition_allocator/page_allocator_constants.h
  2. index bfd5753..b589e69 100644
  3. --- a/base/allocator/partition_allocator/page_allocator_constants.h
  4. +++ b/base/allocator/partition_allocator/page_allocator_constants.h
  5. @@ -46,7 +46,7 @@ PageAllocationGranularityShift() {
  6. // compiled for 64kB are likely to work on 4kB systems, 64kB is a good choice
  7. // here.
  8. return 16; // 64kB
  9. -#elif defined(_MIPS_ARCH_LOONGSON)
  10. +#elif defined(_MIPS_ARCH_LOONGSON) || defined(ARCH_CPU_ARM64)
  11. return 14; // 16kB
  12. #elif defined(OS_APPLE) && defined(ARCH_CPU_64_BITS)
  13. return vm_page_shift;
  14. diff --git a/base/allocator/partition_allocator/partition_alloc_constants.h b/base/allocator/partition_allocator/partition_alloc_constants.h
  15. index 404ff59..29cbcd8 100644
  16. --- a/base/allocator/partition_allocator/partition_alloc_constants.h
  17. +++ b/base/allocator/partition_allocator/partition_alloc_constants.h
  18. @@ -38,7 +38,7 @@ namespace base {
  19. // other constant values, we pack _all_ `PartitionRoot::Alloc` sizes perfectly
  20. // up against the end of a system page.
  21.  
  22. -#if defined(_MIPS_ARCH_LOONGSON)
  23. +#if defined(_MIPS_ARCH_LOONGSON) || defined(ARCH_CPU_ARM64)
  24. PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t
  25. PartitionPageShift() {
  26. return 16; // 64 KiB
  27. diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
  28. index bd1fefe..c968fff 100644
  29. --- a/build/config/compiler/BUILD.gn
  30. +++ b/build/config/compiler/BUILD.gn
  31. @@ -463,7 +463,7 @@ config("compiler") {
  32. # Reduce the page size from 65536 in order to reduce binary size slightly
  33. # by shrinking the alignment gap between segments. This also causes all
  34. # segments to be mapped adjacently, which breakpad relies on.
  35. - ldflags += [ "-Wl,-z,max-page-size=4096" ]
  36. + ldflags += [ "-Wl,-z,max-page-size=16384" ]
  37. }
  38. } else if (use_gold) {
  39. ldflags += [ "-fuse-ld=gold" ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement