summaryrefslogtreecommitdiffstats
path: root/base/process_util_unittest.cc
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-14 15:43:00 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-14 15:43:00 +0000
commit0281161c09660b9ea12337e6ea91d14a0a0c4e6d (patch)
tree18a1b7ca965c034c7f19dde3af15021cc7826e92 /base/process_util_unittest.cc
parentd15012168dcf10d9a1493c902df4fd2215cb5cb3 (diff)
downloadchromium_src-0281161c09660b9ea12337e6ea91d14a0a0c4e6d.zip
chromium_src-0281161c09660b9ea12337e6ea91d14a0a0c4e6d.tar.gz
chromium_src-0281161c09660b9ea12337e6ea91d14a0a0c4e6d.tar.bz2
64-bit support for Mac OS X in base_unittests.
BUG=44127, 18323 TEST=64-bit base_unittests should all pass Review URL: http://codereview.chromium.org/2126001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47275 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_unittest.cc')
-rw-r--r--base/process_util_unittest.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/base/process_util_unittest.cc b/base/process_util_unittest.cc
index 9c4aa5d..d58db37 100644
--- a/base/process_util_unittest.cc
+++ b/base/process_util_unittest.cc
@@ -630,7 +630,11 @@ TEST_F(OutOfMemoryTest, Posix_memalign) {
#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 @@ TEST_F(OutOfMemoryTest, CFAllocatorMallocZone) {
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)