Commit 21f75f9a authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Reduce regular heap object size limit to half of the page size

This CL removes PPC specific constants and makes the regular heap
object size limit a power of two.

Bug: chromium:852420
Change-Id: I5f4000f76d029d689d22112877eea124774b29d2
Reviewed-on: https://chromium-review.googlesource.com/c/1496367Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60011}
parent 438eee84
...@@ -236,13 +236,8 @@ constexpr int kExternalAllocationSoftLimit = ...@@ -236,13 +236,8 @@ constexpr int kExternalAllocationSoftLimit =
// migrated from new space to large object space. Takes double alignment into // migrated from new space to large object space. Takes double alignment into
// account. // account.
// //
// Current value: Page::kAllocatableMemory (on 32-bit arch) - 512 (slack). // Current value: half of the page size.
#ifdef V8_HOST_ARCH_PPC constexpr int kMaxRegularHeapObjectSize = (1 << (kPageSizeBits - 1));
// Reduced kMaxRegularHeapObjectSize due to larger page size(64k) on ppc64le
constexpr int kMaxRegularHeapObjectSize = 327680;
#else
constexpr int kMaxRegularHeapObjectSize = 507136;
#endif
constexpr int kBitsPerByte = 8; constexpr int kBitsPerByte = 8;
constexpr int kBitsPerByteLog2 = 3; constexpr int kBitsPerByteLog2 = 3;
......
...@@ -1948,7 +1948,7 @@ class V8_EXPORT_PRIVATE FreeList { ...@@ -1948,7 +1948,7 @@ class V8_EXPORT_PRIVATE FreeList {
static const size_t kTinyListMax = 0x1f * kTaggedSize; static const size_t kTinyListMax = 0x1f * kTaggedSize;
static const size_t kSmallListMax = 0xff * kTaggedSize; static const size_t kSmallListMax = 0xff * kTaggedSize;
static const size_t kMediumListMax = 0x7ff * kTaggedSize; static const size_t kMediumListMax = 0x7ff * kTaggedSize;
static const size_t kLargeListMax = 0x3fff * kTaggedSize; static const size_t kLargeListMax = 0x2fff * kTaggedSize;
static const size_t kTinyAllocationMax = kTiniestListMax; static const size_t kTinyAllocationMax = kTiniestListMax;
static const size_t kSmallAllocationMax = kTinyListMax; static const size_t kSmallAllocationMax = kTinyListMax;
static const size_t kMediumAllocationMax = kSmallListMax; static const size_t kMediumAllocationMax = kSmallListMax;
......
...@@ -176,13 +176,7 @@ class HashTable : public HashTableBase { ...@@ -176,13 +176,7 @@ class HashTable : public HashTableBase {
// Don't shrink a HashTable below this capacity. // Don't shrink a HashTable below this capacity.
static const int kMinShrinkCapacity = 16; static const int kMinShrinkCapacity = 16;
// Maximum length to create a regular HashTable (aka. non large object). static const int kMaxRegularCapacity = kMaxRegularHeapObjectSize / 32;
#if V8_HOST_ARCH_PPC
// Reduced kMaxRegularCapacity due to reduced kMaxRegularHeapObjectSize
static const int kMaxRegularCapacity = 16384 / 2;
#else
static const int kMaxRegularCapacity = 16384;
#endif
// Returns the index for an entry (of the key) // Returns the index for an entry (of the key)
static constexpr inline int EntryToIndex(int entry) { static constexpr inline int EntryToIndex(int entry) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment