8 #ifndef OPENDDS_DCPS_SAFETY_PROFILE_POOL_H 9 #define OPENDDS_DCPS_SAFETY_PROFILE_POOL_H 12 #include "dds/Versioned_Namespace.h"
14 #ifdef OPENDDS_SAFETY_PROFILE 22 class SafetyProfilePoolTest;
36 friend class SafetyProfilePoolTest;
41 void configure_pool(
size_t size,
size_t granularity);
44 void*
malloc(std::size_t size)
47 return main_pool_->pool_alloc(size);
53 main_pool_->pool_free(ptr);
56 void*
calloc(std::size_t bytes,
char init =
'\0')
58 void*
const mem =
malloc(bytes);
59 std::memset(mem, init, bytes);
63 void*
calloc(std::size_t elems, std::size_t size,
char init =
'\0')
65 return calloc(elems * size, init);
68 int remove() {
return -1; }
69 int bind(
const char*,
void*,
int = 0) {
return -1; }
70 int trybind(
const char*,
void*&) {
return -1; }
71 int find(
const char*,
void*&) {
return -1; }
72 int find(
const char*) {
return -1; }
73 int unbind(
const char*,
void*&) {
return -1; }
74 int unbind(
const char*) {
return -1; }
75 int sync(
ssize_t = -1,
int = MS_SYNC) {
return -1; }
76 int sync(
void*,
size_t,
int = MS_SYNC) {
return -1; }
77 int protect(
ssize_t = -1,
int = PROT_RDWR) {
return -1; }
78 int protect(
void*,
size_t,
int = PROT_RDWR) {
return -1; }
88 MemoryPool* main_pool_;
91 friend class InstanceMaker;
98 #else // ! OPENDDS_SAFETY_PROFILE 110 #endif // OPENDDS_SAFETY_PROFILE 112 #endif // OPENDDS_DCPS_SAFETY_PROFILE_POOL_H
#define ACE_GUARD(MUTEX, OBJ, LOCK)
void * calloc(size_t elements, size_t sizeof_elements)
int bind(Container &c, const FirstType &first, const SecondType &second)
#define OpenDDS_Dcps_Export
ACE_Guard< ACE_Thread_Mutex > lock_
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
ACE_Allocator SafetyProfilePool
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
The Internal API and Implementation of OpenDDS.
int unbind(Container &c, const typename Container::key_type &k, typename Container::mapped_type &v)
int find(Container &c, const Key &key, typename Container::mapped_type *&value)