2c555da9e5
PPC has a larger page size than other platforms, so increase the page size in the test to account for this. Change-Id: I392064e9ef3f87c5bddb7763b35661aee5b4669d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2502330 Auto-Submit: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Reviewed-by: Milad Fa <mfarazma@redhat.com> Reviewed-by: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#70857}
22 lines
685 B
JavaScript
22 lines
685 B
JavaScript
// Copyright 2015 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
//
|
|
// Flags: --allow-natives-syntax
|
|
|
|
(function() {
|
|
// kPageSizeBits is 19 on PPC.
|
|
const kPageSizeBits = 19;
|
|
const kMaxHeapObjectSize = (1 << (kPageSizeBits - 1));
|
|
|
|
const filler = "Large amount of text per element, so that the joined array is"
|
|
+ "large enough to be allocated in the large object space"
|
|
const size = Math.ceil(kMaxHeapObjectSize / filler.length + 1);
|
|
const arr = Array(size).fill(filler);
|
|
|
|
for (let i = 0; i < 10; i++) {
|
|
assertTrue(%InLargeObjectSpace(arr.join("")));
|
|
}
|
|
|
|
})();
|