36 template <
class TValueType>
41 using value_type = TValueType;
43 using pointer = TValueType*;
45 using difference_type =
typename std::pointer_traits<pointer>::difference_type;
47 using size_type = std::make_unsigned_t<difference_type>;
49 using propagate_on_container_copy_assignment = std::true_type;
51 using propagate_on_container_move_assignment = std::true_type;
53 using propagate_on_container_swap = std::true_type;
55 using is_always_equal = std::true_type;
58 mValues =
new TValueType[mSizeElements];
63 template <
class TAllocatorType>
72 template <
class... Args>
73 void construct(TValueType* p, Args&& ... args) {
74 *p = TValueType(std::forward<Args...>(args...));
77 void destroy(TValueType* ) {
81 size_type max_size() {
85 TValueType* allocate(
size_t) {
86 return static_cast<TValueType*
>(mValues);
89 void deallocate(TValueType*,
size_t) {
95 static constexpr
size_t mSizeBytes = 1 << 14;
97 static constexpr
size_t mSizeElements = mSizeBytes /
sizeof(TValueType);
102 template <
class TValueType>
107 template <
class TValueType>
Definition: AllocatorHeap.h:37