20 #ifndef FASTRTPS_UTILS_COLLECTIONS_FOONATHAN_MEMORY_HELPERS_HPP_
21 #define FASTRTPS_UTILS_COLLECTIONS_FOONATHAN_MEMORY_HELPERS_HPP_
23 #include <foonathan/memory/memory_pool.hpp>
24 #include <foonathan/memory/detail/debug_helpers.hpp>
26 #include "ResourceLimitedContainerConfig.hpp"
27 #include "fastrtps/config.h"
43 template <
typename MemoryPool>
45 std::size_t node_size,
48 FASTDDS_DEPRECATED_UNTIL(3,
"eprosima::fastrtps::memory_pool_block_size",
"You should not use this method")
49 namespace fm = foonathan::memory;
58 * ((node_size > MemoryPool::min_node_size ? node_size : MemoryPool::min_node_size)
59 #
if FOONATHAN_MEMORY_DEBUG_DOUBLE_DEALLOC_CHECK
60 * (fm::detail::debug_fence_size ? 3 : 1))
62 + (fm::detail::debug_fence_size ? 2 * fm::detail::max_alignment : 0))
64 #ifdef FOONATHAN_MEMORY_MEMORY_POOL_HAS_MIN_BLOCK_SIZE
65 + fm::detail::memory_block_stack::implementation_offset();
67 + fm::detail::memory_block_stack::implementation_offset;
68 #endif // FOONATHAN_MEMORY_MEMORY_POOL_HAS_MIN_BLOCK_SIZE