30 #ifndef BIT_MEMORY_ALLOCATORS_ALIGNED_ALLOCATOR_HPP 31 #define BIT_MEMORY_ALLOCATORS_ALIGNED_ALLOCATOR_HPP 33 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 35 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 37 #include "detail/named_allocator.hpp" 39 #include "../utilities/allocator_info.hpp" 40 #include "../utilities/macros.hpp" 41 #include "../utilities/owner.hpp" 43 #include "../regions/aligned_heap_memory.hpp" 46 #include <type_traits> 65 using default_alignment = std::integral_constant<std::size_t,1>;
110 owner<void*>
try_allocate( std::size_t size, std::size_t align ) noexcept;
116 void deallocate( owner<void*> p, std::size_t size );
136 using named_aligned_allocator = detail::named_allocator<aligned_allocator>;
141 #include "detail/aligned_allocator.inl" allocator_info info() const noexcept
Gets the info about this allocator.
This stateless allocator performs all of its allocation calls using aligned memory invocations...
void deallocate(owner< void *> p, std::size_t size)
Deallocates a pointer p with the allocation size of size.
aligned_allocator & operator=(aligned_allocator &&other) noexcept=default
Move-assigns an aligned_allocator from another allocator.
owner< void * > try_allocate(std::size_t size, std::size_t align) noexcept
Allocates aligned memory of size size, with alignment to a boundary of at least align.
aligned_allocator()=default
Default-constructs a aligned_allocator.
This type is used to hold the generic information for a given allocator.