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

Unified Diff: base/process_util_unittest.cc

Issue 2126001: 64-bit support for Mac OS X in base_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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
« no previous file with comments | « no previous file | base/process_util_unittest_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_unittest.cc
===================================================================
--- base/process_util_unittest.cc (revision 47162)
+++ base/process_util_unittest.cc (working copy)
@@ -630,7 +630,11 @@
#if defined(OS_MACOSX)
// Since these allocation functions take a signed size, it's possible that
-// calling them just once won't be enough to exhaust memory.
+// calling them just once won't be enough to exhaust memory. In the 32-bit
+// environment, it's likely that these allocation attempts will fail because
+// not enough contiguous address space is availble. In the 64-bit environment,
+// it's likely that they'll fail because they would require a preposterous
+// amount of (virtual) memory.
TEST_F(OutOfMemoryTest, CFAllocatorSystemDefault) {
ASSERT_DEATH(while ((value_ =
@@ -647,11 +651,17 @@
base::AllocateViaCFAllocatorMallocZone(signed_test_size_))) {}, "");
}
+#if !defined(ARCH_CPU_64_BITS)
+
+// See process_util_unittest_mac.mm for an explanation of why this test isn't
+// run in the 64-bit environment.
+
TEST_F(OutOfMemoryTest, PsychoticallyBigObjCObject) {
ASSERT_DEATH(while ((value_ =
base::AllocatePsychoticallyBigObjCObject())) {}, "");
}
+#endif // !ARCH_CPU_64_BITS
#endif // OS_MACOSX
#endif // !defined(OS_WIN)
« no previous file with comments | « no previous file | base/process_util_unittest_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698