Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2533)

Unified Diff: test/cctest/test-spaces.cc

Issue 1325853003: [heap,cctest] Fix CodeRange tests that call AllocateRawMemory directly. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« test/cctest/test-alloc.cc ('K') | « test/cctest/test-alloc.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-spaces.cc
diff --git a/test/cctest/test-spaces.cc b/test/cctest/test-spaces.cc
index 292b27fd00cad41a8057f10bf98c8e31d7b0ed03..bbf9835a85a731ee07b8a380bb8891a0dfe60fc3 100644
--- a/test/cctest/test-spaces.cc
+++ b/test/cctest/test-spaces.cc
@@ -224,8 +224,10 @@ TEST(Regress3540) {
}
Address address;
size_t size;
+ size_t request_size = code_range_size - 2 * pageSize;
address = code_range->AllocateRawMemory(
- code_range_size - 2 * pageSize, code_range_size - 2 * pageSize, &size);
+ request_size, request_size - (2 * MemoryAllocator::CodePageGuardSize()),
+ &size);
CHECK(address != NULL);
Address null_address;
size_t null_size;
« test/cctest/test-alloc.cc ('K') | « test/cctest/test-alloc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698