summaryrefslogtreecommitdiff
path: root/tests/Malloc_Test.cpp
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-12-09 21:56:38 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-12-09 21:56:38 +0000
commit5fd123136b6dfcd0a0919bcb0ff2d16ddeb2daa8 (patch)
tree2b7eb550941e527315d83c04fbf81af8bfa300d6 /tests/Malloc_Test.cpp
parent195e079a3e6af4188ae91c41294e870e3f2a92d8 (diff)
downloadATCD-5fd123136b6dfcd0a0919bcb0ff2d16ddeb2daa8.tar.gz
ChangeLogTag:Thu Dec 09 15:53:20 1999 Nanbor Wang <nanbor@cs.wustl.edu>
Diffstat (limited to 'tests/Malloc_Test.cpp')
-rw-r--r--tests/Malloc_Test.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/Malloc_Test.cpp b/tests/Malloc_Test.cpp
index 765d6347f38..15c773e1425 100644
--- a/tests/Malloc_Test.cpp
+++ b/tests/Malloc_Test.cpp
@@ -32,7 +32,11 @@ USELIB("..\ace\aced.lib");
#if !defined (__Lynx__) && (!defined (ACE_LACKS_FORK) || defined (ACE_WIN32))
+#if defined (ACE_HAS_POSITION_INDEPENDENT_MALLOC)
+typedef ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_PI_Control_Block> MALLOC;
+#else
typedef ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex> MALLOC;
+#endif /* ACE_HAS_POSITION_INDEPENDENT_MALLOC */
#define MMAP_FILENAME ACE_TEXT ("test_file")
#define MUTEX_NAME ACE_TEXT ("test_lock")
@@ -326,9 +330,16 @@ main (int argc, ASYS_TCHAR *[])
}
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+#if defined (ACE_HAS_POSITION_INDEPENDENT_MALLOC)
+template class ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_PI_Control_Block>;
+template class auto_ptr< ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_PI_Control_Block> >;
+template class ACE_Auto_Basic_Ptr< ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_PI_Control_Block> >;
+#else
template class ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex>;
+template class ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_Control_Block>;
template class auto_ptr< ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex> >;
template class ACE_Auto_Basic_Ptr< ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex> >;
+#endif /* ACE_HAS_POSITION_INDEPENDENT_MALLOC */
template class ACE_Write_Guard<ACE_Process_Mutex>;
template class ACE_Read_Guard<ACE_Process_Mutex>;
template class ACE_Based_Pointer<Test_Data>;
@@ -337,9 +348,16 @@ template class ACE_Based_Pointer_Basic<long>;
template class ACE_Based_Pointer_Basic<Long_Test>;
template class ACE_Based_Pointer<Long_Test>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+#if defined (ACE_HAS_POSITION_INDEPENDENT_MALLOC)
+#pragma instantiate ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_PI_Control_Block>
+#pragma instantiate auto_ptr< ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_PI_Control_Block> >
+#pragma instantiate ACE_Auto_Basic_Ptr< ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_PI_Control_Block> >;
+#else
#pragma instantiate ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex>
+#pragma instantiate ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_Control_Block>
#pragma instantiate auto_ptr< ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex> >
#pragma instantiate ACE_Auto_Basic_Ptr< ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex> >;
+#endif /* ACE_HAS_POSITION_INDEPENDENT_MALLOC */
#pragma instantiate ACE_Write_Guard<ACE_Process_Mutex>
#pragma instantiate ACE_Read_Guard<ACE_Process_Mutex>
#pragma instantiate ACE_Based_Pointer<Test_Data>