From 45b64d15a0e95d11be29d24faff853a1ad03bfb3 Mon Sep 17 00:00:00 2001 From: bjaideep Date: Wed, 5 Oct 2016 12:47:11 -0700 Subject: [PATCH] [heap] Update verification of LO_SPACE in SizeOfInitialHeap On PPC64 linux the OS page size is 64KB, therefore when the snapshot is created the serialized heap already has LO_SPACE allocated(the allocation goes beyond the 1st page of CODE_SPACE and hence LO_SPACE is allocated). I've updated the testcase to check if the delta of the LO_SPACE is zero. R=mlippautz@chromium.org, ulan@chromium.org, vogelheim@chromium.org BUG= Review-Url: https://codereview.chromium.org/2394893002 Cr-Commit-Position: refs/heads/master@{#40014} --- test/cctest/heap/test-spaces.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/cctest/heap/test-spaces.cc b/test/cctest/heap/test-spaces.cc index fb05c98400..262d0c5d58 100644 --- a/test/cctest/heap/test-spaces.cc +++ b/test/cctest/heap/test-spaces.cc @@ -500,6 +500,8 @@ TEST(SizeOfInitialHeap) { ->IsUndefined()) { return; } + // Initial size of LO_SPACE + size_t initial_lo_space = isolate->heap()->lo_space()->Size(); // The limit for each space for an empty isolate containing just the // snapshot. @@ -528,7 +530,7 @@ TEST(SizeOfInitialHeap) { } // No large objects required to perform the above steps. - CHECK(isolate->heap()->lo_space()->IsEmpty()); + CHECK_EQ(initial_lo_space, isolate->heap()->lo_space()->Size()); } static HeapObject* AllocateUnaligned(NewSpace* space, int size) {