15 #include <ace/Lib_Find.h>
27 m_pAccessMutex(nullptr),
28 m_pWaitDataMutex(nullptr),
55 char temp_dir_path[1024];
57 if (ACE::get_temp_dir(temp_dir_path, 1024) == -1) {
62 #ifdef ACE_LACKS_SYSV_SHMEM
64 snprintf(obj_name, 2048,
"%sSHMEM_FILE_%d_0", temp_dir_path, port);
66 m_pMap =
new ACE_Shared_Memory_MM(obj_name,
69 ACE_DEFAULT_FILE_PERMS,
75 m_pMap =
new ACE_Shared_Memory_SV(port, size +
sizeof(
ShmemHeader_t), ACE_Shared_Memory_SV::ACE_CREATE);
82 #ifdef _ACE_USE_SV_SEM
83 snprintf(obj_name, 2048,
"%sSHMEM_ACCESS_MUTEX_%d", temp_dir_path, port);
85 snprintf(obj_name, 2048,
"%sSHMEM_WAITDATA_MUTEX_%d", temp_dir_path, port);
88 snprintf(obj_name, 2048,
"SHMEM_ACCESS_MUTEX_%d", port);
90 snprintf(obj_name, 2048,
"SHMEM_WAITDATA_MUTEX_%d", port);
118 ACE_Shared_Memory* pNewMap;
123 #ifdef ACE_LACKS_SYSV_SHMEM
125 char file_path[1024];
127 if (ACE::get_temp_dir(file_path, 1024) == -1) {
132 char file_name[2048];
135 pNewMap =
new ACE_Shared_Memory_MM(file_name,
138 ACE_DEFAULT_FILE_PERMS,
146 pNewMap =
new ACE_Shared_Memory_SV(shmemkey, newsize +
sizeof(
ShmemHeader_t), ACE_Shared_Memory_SV::ACE_CREATE);
156 char* pNewData = (
char*)(pNewHeader + 1);
158 pNewHeader->size = newsize;
159 pNewHeader->resize =
false;
162 pNewHeader->tail = 0;