Go to the documentation of this file.
19 #include <aws/common/common.h>
28 template <
typename T>
class StlAllocator :
public std::allocator<T>
31 using Base = std::allocator<T>;
57 return reinterpret_cast<typename Base::pointer
>(aws_mem_acquire(
m_allocator,
n *
sizeof(T)));
aws_allocator Allocator
Definition: StlAllocator.h:25
std::allocator< T > Base
Definition: StlAllocator.h:31
Base::pointer allocate(size_type n, const void *hint=nullptr)
Definition: StlAllocator.h:53
Allocator * m_allocator
Definition: StlAllocator.h:66
void deallocate(typename Base::pointer p, size_type)
Definition: StlAllocator.h:60
Definition: StlAllocator.h:49
Allocator * g_allocator
Definition: Api.cpp:28
StlAllocator(const StlAllocator< T > &a) noexcept
Definition: StlAllocator.h:37
StlAllocator() noexcept
Definition: StlAllocator.h:33
cJSON * n
Definition: cJSON.cpp:2079
~StlAllocator()
Definition: StlAllocator.h:44
cJSON * p
Definition: cJSON.cpp:2080
std::size_t size_type
Definition: StlAllocator.h:46
StlAllocator< U > other
Definition: StlAllocator.h:50
cJSON * a
Definition: cJSON.cpp:2081
Definition: StlAllocator.h:29
StlAllocator(Allocator *allocator) noexcept
Definition: StlAllocator.h:35
StlAllocator(const StlAllocator< U > &a) noexcept
Definition: StlAllocator.h:39