|
constexpr | Pool (const Capabilities &capabilities, const Layout &layout) |
|
const Layout & | layout () const |
|
void * | Allocate () |
|
constexpr const Capabilities & | capabilities () const |
|
bool | HasCapability (Capability capability) const |
| Returns whether a given capabilityis enabled for this object.
|
|
void | Deallocate (void *ptr) |
|
void | Deallocate (void *ptr, Layout layout) |
|
template<typename T > |
void | Delete (T *ptr) |
|
StatusWithSize | GetCapacity () const |
|
bool | IsEqual (const Deallocator &other) const |
|
template<typename T , int &... kExplicitGuard, std::enable_if_t< is_bounded_array_v< T >, int > = 0, typename... Args> |
void | WrapUnique (Args &&...)=delete |
|
|
using | Capabilities = allocator::Capabilities |
|
using | Capability = allocator::Capability |
|
using | Layout = allocator::Layout |
|
constexpr | Deallocator ()=default |
| TODO(b/326509341): Remove when downstream consumers migrate.
|
|
constexpr | Deallocator (const Capabilities &capabilities) |
|
template<typename T , std::enable_if_t<!std::is_array_v< T >, int > = 0> |
UniquePtr< T > | WrapUnique (T *ptr) |
|
template<typename T , int &... kExplicitGuard, typename ElementType = std::remove_extent_t<T>, std::enable_if_t< is_unbounded_array_v< T >, int > = 0> |
UniquePtr< T > | WrapUnique (ElementType *ptr, size_t size) |
|
template<typename T > |
UniquePtr< T[]> | WrapUniqueArray (T *ptr, size_t size) |
|
template<typename T > |
static constexpr bool | is_bounded_array_v |
|
template<typename T > |
static constexpr bool | is_unbounded_array_v |
|
Abstract interface for fixed-layout memory allocation.
The interface makes no guarantees about its implementation. Consumers of the generic interface must not make any assumptions around allocator behavior, thread safety, or performance.