diff options
-rw-r--r-- | ACE/tests/New_Fail_Test.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ACE/tests/New_Fail_Test.cpp b/ACE/tests/New_Fail_Test.cpp index 09e804ebc75..064c4262655 100644 --- a/ACE/tests/New_Fail_Test.cpp +++ b/ACE/tests/New_Fail_Test.cpp @@ -20,6 +20,7 @@ #include "ace/Log_Msg.h" #include "ace/OS_Memory.h" #include "ace/CORBA_macros.h" +#include "ace/Numeric_Limits.h" // This test allocates all of the heap memory, forcing 'new' to fail // because of a lack of memory. The ACE_NEW macros should prevent an @@ -31,7 +32,7 @@ // somewhere else in the test. // Most we can do on Windows, else we get a C2148 compile error -static constexpr size_t BIG_BLOCK = 0x7fffffff - 1; +static const size_t BIG_BLOCK = ACE_Numeric_Limits<size_t>::max ()/4; // Shouldn't take many "as much as possible" tries to get a failure. static constexpr int MAX_ALLOCS_IN_TEST = 20; |