28 #ifndef ALLOCATOR_ADAPTERS
29 #define ALLOCATOR_ADAPTERS
53 template<
size_t alignment = allocationAlignment>
67 template<vm::PageType pageType = vm::kDefault,
int prot = PROT_READ|PROT_WRITE>
81 template<
size_t commitSize = largePageSize, vm::PageType pageType = vm::kDefault,
int prot = PROT_READ|PROT_WRITE>
100 template<
typename T,
class Allocator>
122 : allocator(&allocator)
126 template<
typename U,
class A>
154 return std::numeric_limits<std::size_t>::max() /
sizeof(
T);
183 return allocator->deallocate(ptr, n*
sizeof(
T));
190 #endif // #ifndef ALLOCATOR_ADAPTERS
void * rtl_AllocateAligned(size_t size, size_t align)
pointer allocate(size_type n)
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
void deallocate(void *p, size_t size)
bool operator==(const ProxyAllocator &rhs) const
const T & const_reference
void deallocate(void *p, size_t size)
void * allocate(size_t size)
#define UNUSED2(param)
mark a function local variable or parameter as unused and avoid the corresponding compiler warning...
pointer allocate(size_type n, const void *const)
void * allocate(size_t size)
void construct(const pointer ptr, const value_type &t)
void deallocate(void *p, size_t size)
size_type max_size() const
void * allocate(size_t size)
void deallocate(void *p, size_t size)
#define T(string_literal)
void deallocate(const pointer ptr, const size_type n)
std::ptrdiff_t difference_type
void ReleaseAddressSpace(void *p, size_t size)
release address space and decommit any memory.
fully STL-compatible allocator that simply draws upon another Allocator.
void * allocate(size_t size)
void * Allocate(size_t size, PageType pageType, int prot)
reserve address space and commit memory.
void rtl_FreeAligned(void *alignedPointer)
NOTHROW_DEFINE ProxyAllocator(const ProxyAllocator< U, A > &rhs)
void * ReserveAddressSpace(size_t size, size_t commitSize, PageType pageType, int prot)
reserve address space and set the parameters for any later on-demand commits.
bool operator!=(const ProxyAllocator &rhs) const
NOTHROW_DEFINE ProxyAllocator(Allocator &allocator)
NOTHROW_DEFINE ProxyAllocator()
pointer address(reference r)
void Free(void *p, size_t size)
decommit memory and release address space.
const_pointer address(const_reference s)
void destroy(pointer ptr)
ProxyAllocator< U, Allocator > other