summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-03-09 14:46:38 +0100
committerJohnny Willemsen <jwillemsen@remedy.nl>2021-03-09 14:46:38 +0100
commit14350a335485096c0678e2ca98795fe1a9a19a9f (patch)
treee273825efc695fbdf68dceb6c7499a65fb184184
parent073872266ac2bc33c4f518903f5459b3f5b0e430 (diff)
downloadATCD-14350a335485096c0678e2ca98795fe1a9a19a9f.tar.gz
Work on windows and linux
-rw-r--r--ACE/tests/New_Fail_Test.cpp3
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;