diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-03 05:43:25 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-03 05:43:25 +0000 |
commit | 2264f38af466b83af9bb555ff313d63ab8889c7a (patch) | |
tree | ea706111f1bebfc77f3256d93dc201eca34b6199 /ace/MEM_SAP.cpp | |
parent | a0c03ac51ba68a66b4653dfe79c50bde616a4a36 (diff) | |
download | ATCD-2264f38af466b83af9bb555ff313d63ab8889c7a.tar.gz |
ChangeLogTag:Mon Apr 02 23:41:34 2001 Nanbor Wang <nanbor@cs.wustl.edu>
Diffstat (limited to 'ace/MEM_SAP.cpp')
-rw-r--r-- | ace/MEM_SAP.cpp | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/ace/MEM_SAP.cpp b/ace/MEM_SAP.cpp index 88725dcad8b..ded84c604e6 100644 --- a/ace/MEM_SAP.cpp +++ b/ace/MEM_SAP.cpp @@ -26,7 +26,8 @@ ACE_MEM_SAP::dump (void) const } ACE_MEM_SAP::ACE_MEM_SAP (void) - : shm_malloc_ (0) + : handle_ (ACE_INVALID_HANDLE), + shm_malloc_ (0) { // ACE_TRACE ("ACE_MEM_SAP::ACE_MEM_SAP"); } @@ -52,32 +53,26 @@ ACE_MEM_SAP::create_shm_malloc (const ACE_TCHAR *name, int ACE_MEM_SAP::close_shm_malloc (const int remove) { + ACE_TRACE ("ACE_MEM_SAP::close_shm_malloc"); + if (this->shm_malloc_ != 0 && remove != 0) - { - this->shm_malloc_->remove (); - return 0; - } + return this->shm_malloc_->remove (); + return -1; } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Write_Guard<ACE_Process_Mutex>; template class ACE_Read_Guard<ACE_Process_Mutex>; -#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1) template class 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>; -#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */ +template class ACE_Based_Pointer<ACE_MEM_SAP_Node>; +template class ACE_Based_Pointer_Basic<ACE_MEM_SAP_Node>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Write_Guard<ACE_Process_Mutex> #pragma instantiate ACE_Read_Guard<ACE_Process_Mutex> -#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1) #pragma instantiate 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> -#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */ +#pragma instantiate ACE_Based_Pointer<ACE_MEM_SAP_Node> +#pragma instantiate ACE_Based_Pointer_Basic<ACE_MEM_SAP_Node> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ #endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */ |