Commit c16a3baa authored by Dominik Inführ's avatar Dominik Inführ Committed by Commit Bot

[heap] Reduce size of large object in StressConcurrentAllocatorTask

This ensures that large object has exactly the size of a regular page.
Avoids wasting memory due to alignment.

Bug: v8:10315
Change-Id: Ife8051313f1ea8c1fc0ba0afcc4e5db11f27adca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2335191Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69225}
parent 14a5a6ad
......@@ -10,6 +10,7 @@
#include "src/heap/concurrent-allocator-inl.h"
#include "src/heap/local-heap-inl.h"
#include "src/heap/marking.h"
#include "src/heap/memory-chunk.h"
namespace v8 {
namespace internal {
......@@ -21,7 +22,9 @@ void StressConcurrentAllocatorTask::RunInternal() {
const int kNumIterations = 2000;
const int kSmallObjectSize = 10 * kTaggedSize;
const int kMediumObjectSize = 8 * KB;
const int kLargeObjectSize = kMaxRegularHeapObjectSize * 2;
const int kLargeObjectSize =
static_cast<int>(MemoryChunk::kPageSize -
MemoryChunkLayout::ObjectStartOffsetInDataPage());
for (int i = 0; i < kNumIterations; i++) {
Address address = local_heap.AllocateRawOrFail(
......
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