summaryrefslogtreecommitdiff
path: root/ACE/tests/SV_Shared_Memory_Test.cpp
diff options
context:
space:
mode:
authorjtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-12-31 22:51:38 +0000
committerjtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-12-31 22:51:38 +0000
commitcf2489eb2d2b6ddfd61d675e06d4c3334d53e848 (patch)
tree08247dc41120ab677c4b7b1a9d6f8f80d0443da6 /ACE/tests/SV_Shared_Memory_Test.cpp
parent2be1277c26a4712b23fd8dbd1c5a4e01bc592264 (diff)
downloadATCD-cf2489eb2d2b6ddfd61d675e06d4c3334d53e848.tar.gz
ChangeLogTag: Sun Dec 31 22:33:14 UTC 2006 J.T. Conklin <jtc@acorntoolworks.com>
Diffstat (limited to 'ACE/tests/SV_Shared_Memory_Test.cpp')
-rw-r--r--ACE/tests/SV_Shared_Memory_Test.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/ACE/tests/SV_Shared_Memory_Test.cpp b/ACE/tests/SV_Shared_Memory_Test.cpp
index f8351395346..305e3785c96 100644
--- a/ACE/tests/SV_Shared_Memory_Test.cpp
+++ b/ACE/tests/SV_Shared_Memory_Test.cpp
@@ -140,6 +140,15 @@ run_main (int, ACE_TCHAR *[])
#if defined (ACE_HAS_SYSV_IPC) && !defined (ACE_LACKS_FORK) && \
!defined(ACE_LACKS_SYSV_SHMEM)
+
+ // Check whether allocator was initialized.
+ if (myallocator ().bad ())
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("Unable to initialize allocator\n")),
+ -1);
+ }
+
char *shm = reinterpret_cast<char *> (myallocator ().malloc (SHMSZ));
// Create the mutex and synch before spawning the child process, to