52 #ifndef __PCL_AlignedAllocator_h
53 #define __PCL_AlignedAllocator_h
58 #include <pcl/Diagnostics.h>
124 PCL_PRECONDITION( size != 0 )
125 void* p = PCL_ALIGNED_MALLOC( size, 32 );
126 if ( unlikely( p ==
nullptr ) )
127 throw std::bad_alloc();
128 return PCL_ASSUME_ALIGNED_32( p );
142 PCL_PRECONDITION( p !=
nullptr )
143 PCL_ALIGNED_FREE( p );
157 PCL_PRECONDITION( p !=
nullptr )
162 #pragma warning( push )
163 #pragma warning( disable: 4100 )
167 PCL_PRECONDITION( p !=
nullptr )
170 #pragma warning( pop )
A block allocator class for aligned memory allocation/deallocation.
AlignedAllocator(bool fastGrowth=true, bool canShrink=true)
AlignedAllocator(const AlignedAllocator &)=default
void DeallocateBlock(void *p)
void * AllocateBlock(size_type size)
A block allocator class that uses the standard new and delete operators.