OpenDDS
Snapshot(2023/04/28-20:55)
dds
DCPS
transport
shmem
ShmemAllocator.h
Go to the documentation of this file.
1
/*
2
* Distributed under the OpenDDS License.
3
* See: http://www.opendds.org/license.html
4
*/
5
6
#ifndef OPENDDS_DCPS_TRANSPORT_SHMEM_SHMEMALLOCATOR_H
7
#define OPENDDS_DCPS_TRANSPORT_SHMEM_SHMEMALLOCATOR_H
8
9
#include <
dds/Versioned_Namespace.h
>
10
11
#include <
ace/Local_Memory_Pool.h
>
12
#include <
ace/Malloc_T.h
>
13
#include <
ace/Pagefile_Memory_Pool.h
>
14
#include <
ace/PI_Malloc.h
>
15
#include <
ace/Process_Mutex.h
>
16
#include <
ace/Shared_Memory_Pool.h
>
17
18
OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
19
20
namespace
OpenDDS
{
21
namespace
DCPS {
22
23
class
ShmemInst;
24
25
#if defined ACE_WIN32 && !defined ACE_HAS_WINCE
26
# define OPENDDS_SHMEM_WINDOWS
27
typedef
ACE_Pagefile_Memory_Pool
ShmemPool
;
28
typedef
HANDLE
ShmemSharedSemaphore
;
29
30
#elif !defined ACE_LACKS_SYSV_SHMEM \
31
&& defined ACE_HAS_POSIX_SEM \
32
&& !defined ACE_LACKS_UNNAMED_SEMAPHORE
33
# define OPENDDS_SHMEM_UNIX
34
typedef
ACE_Shared_Memory_Pool
ShmemPool
;
35
typedef
sem_t
ShmemSharedSemaphore
;
36
# if !defined ACE_HAS_POSIX_SEM_TIMEOUT && \
37
!defined ACE_DISABLE_POSIX_SEM_TIMEOUT_EMULATION
38
# define OPENDDS_SHMEM_UNIX_EMULATE_SEM_TIMEOUT
39
# endif
40
41
// No Support for this Platform, Trying to Use Shared Memory Transport Will
42
// Yield a Runtime Error
43
#else
44
# define OPENDDS_SHMEM_UNSUPPORTED
45
// These are just place holders
46
typedef
ACE_Local_Memory_Pool
ShmemPool
;
47
typedef
int
ShmemSharedSemaphore
;
48
#endif
49
50
typedef
ACE_Malloc_T<ShmemPool, ACE_Process_Mutex, ACE_PI_Control_Block>
ShmemAllocator
;
51
52
}
// namespace DCPS
53
}
// namespace OpenDDS
54
55
OPENDDS_END_VERSIONED_NAMESPACE_DECL
56
57
#endif
/* OPENDDS_DCPS_TRANSPORT_SHMEM_SHMEMALLOCATOR_H */
Versioned_Namespace.h
OpenDDS::DCPS::ShmemPool
ACE_Local_Memory_Pool ShmemPool
Definition:
ShmemAllocator.h:46
ACE_Local_Memory_Pool
Local_Memory_Pool.h
OpenDDS::DCPS::ShmemAllocator
ACE_Malloc_T< ShmemPool, ACE_Process_Mutex, ACE_PI_Control_Block > ShmemAllocator
Definition:
ShmemAllocator.h:50
ACE_Malloc_T
OpenDDS::DCPS::ShmemSharedSemaphore
int ShmemSharedSemaphore
Definition:
ShmemAllocator.h:47
PI_Malloc.h
Pagefile_Memory_Pool.h
ACE_Shared_Memory_Pool
Malloc_T.h
OPENDDS_END_VERSIONED_NAMESPACE_DECL
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
Definition:
Versioned_Namespace.h:48
OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
Definition:
Hash.cpp:17
Process_Mutex.h
Shared_Memory_Pool.h
OpenDDS
The Internal API and Implementation of OpenDDS.
Definition:
AddressCache.h:28
ACE_Pagefile_Memory_Pool
Generated by
1.8.13