30 #ifndef BIT_MEMORY_ALLOCATORS_ALIGNED_OFFSET_ALLOCATOR_HPP 31 #define BIT_MEMORY_ALLOCATORS_ALIGNED_OFFSET_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>;
113 std::size_t offset = 0 ) noexcept;
119 void deallocate( owner<void*> p, std::size_t size );
139 using named_aligned_allocator = detail::named_allocator<aligned_offset_allocator>;
144 #include "detail/aligned_offset_allocator.inl" void deallocate(owner< void *> p, std::size_t size)
Deallocates a pointer p with the allocation size of size.
This stateless allocator performs all of its allocation calls using aligned memory invocations aligne...
allocator_info info() const noexcept
Gets the info about this allocator.
owner< void * > try_allocate(std::size_t size, std::size_t align, std::size_t offset=0) noexcept
Allocates aligned memory of size size, with alignment to a boundary of at least align, aligned to an offset.
aligned_offset_allocator & operator=(aligned_offset_allocator &&other) noexcept=default
Move-assigns an aligned_offset_allocator from another allocator.
aligned_offset_allocator()=default
Default-constructs a aligned_offset_allocator.
This type is used to hold the generic information for a given allocator.