OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #define _CRT_SECURE_NO_WARNINGS | 5 #define _CRT_SECURE_NO_WARNINGS |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/eintr_wrapper.h" | 10 #include "base/eintr_wrapper.h" |
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 #if !defined(OS_WIN) | 839 #if !defined(OS_WIN) |
840 | 840 |
841 #if defined(USE_TCMALLOC) | 841 #if defined(USE_TCMALLOC) |
842 extern "C" { | 842 extern "C" { |
843 int tc_set_new_mode(int mode); | 843 int tc_set_new_mode(int mode); |
844 } | 844 } |
845 #endif // defined(USE_TCMALLOC) | 845 #endif // defined(USE_TCMALLOC) |
846 | 846 |
847 // Android doesn't implement set_new_handler, so we can't use the | 847 // Android doesn't implement set_new_handler, so we can't use the |
848 // OutOfMemoryTest cases. | 848 // OutOfMemoryTest cases. |
849 #if !defined(OS_ANDROID) | 849 // OpenBSD does not support these tests either. |
| 850 #if !defined(OS_ANDROID) && !defined(OS_OPENBSD) |
850 class OutOfMemoryDeathTest : public testing::Test { | 851 class OutOfMemoryDeathTest : public testing::Test { |
851 public: | 852 public: |
852 OutOfMemoryDeathTest() | 853 OutOfMemoryDeathTest() |
853 : value_(NULL), | 854 : value_(NULL), |
854 // Make test size as large as possible minus a few pages so | 855 // Make test size as large as possible minus a few pages so |
855 // that alignment or other rounding doesn't make it wrap. | 856 // that alignment or other rounding doesn't make it wrap. |
856 test_size_(std::numeric_limits<std::size_t>::max() - 12 * 1024), | 857 test_size_(std::numeric_limits<std::size_t>::max() - 12 * 1024), |
857 signed_test_size_(std::numeric_limits<ssize_t>::max()) { | 858 signed_test_size_(std::numeric_limits<ssize_t>::max()) { |
858 } | 859 } |
859 | 860 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 while ((value_ = base::AllocatePsychoticallyBigObjCObject())) {} | 1076 while ((value_ = base::AllocatePsychoticallyBigObjCObject())) {} |
1076 }, ""); | 1077 }, ""); |
1077 } | 1078 } |
1078 | 1079 |
1079 #endif // !ARCH_CPU_64_BITS | 1080 #endif // !ARCH_CPU_64_BITS |
1080 #endif // OS_MACOSX | 1081 #endif // OS_MACOSX |
1081 | 1082 |
1082 #endif // !defined(OS_ANDROID) | 1083 #endif // !defined(OS_ANDROID) |
1083 | 1084 |
1084 #endif // !defined(OS_WIN) | 1085 #endif // !defined(OS_WIN) |
OLD | NEW |