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

Unified Diff: base/allocator/partition_allocator/partition_alloc_unittest.cc

Issue 2584123002: PartitionAllocTest: increase address space limit to 6 GB. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/allocator/partition_allocator/partition_alloc_unittest.cc
diff --git a/base/allocator/partition_allocator/partition_alloc_unittest.cc b/base/allocator/partition_allocator/partition_alloc_unittest.cc
index dbc8ed21018a193ff3b2ad26cd71771cd90862b5..ddbd63e5f5e79dfc9eceaab981203cfa0b7b22ea 100644
--- a/base/allocator/partition_allocator/partition_alloc_unittest.cc
+++ b/base/allocator/partition_allocator/partition_alloc_unittest.cc
@@ -74,7 +74,10 @@ bool SetAddressSpaceLimit() {
#elif defined(OS_POSIX) && !defined(OS_MACOSX)
// Mac will accept RLIMIT_AS changes but it is not enforced.
// See https://crbug.com/435269 and rdar://17576114.
- const size_t kAddressSpaceLimit = static_cast<size_t>(4096) * 1024 * 1024;
+ // Note: this number must be not less than 6 GB, because with
+ // sanitizer_coverage_flags=edge, it reserves > 5 GB of address
+ // space, see https://crbug.com/674665.
+ const size_t kAddressSpaceLimit = static_cast<size_t>(6144) * 1024 * 1024;
struct rlimit limit;
if (getrlimit(RLIMIT_AS, &limit) != 0)
return false;
@@ -1299,7 +1302,7 @@ static void DoReturnNullTest(size_t allocSize) {
// Tests that if an allocation fails in "return null" mode, repeating it doesn't
// crash, and still returns null. The test tries to allocate 6 GB of memory in
-// 512 kB blocks. On 64-bit POSIX systems, the address space is limited to 4 GB
+// 512 kB blocks. On 64-bit POSIX systems, the address space is limited to 6 GB
// using setrlimit() first.
//
// Disable this test on Android because, due to its allocation-heavy behavior,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698