Skip to main content
Pigweed's logo Pigweed
code_xml
  1. Home
  2. Reference
  3. C/C++
  4. pw::allocator::internal::BasicAbstractDeallocator< Base > Class Template Reference
pw::allocator::internal::BasicAbstractDeallocator< Base > Class Template Reference

Overview

template<typename Base>
class pw::allocator::internal::BasicAbstractDeallocator< Base >

Mix-in that provides default implementations of optional pw::Deallocator methods for a Base type that derives from pw::Deallocator (such as pw::Deallocator, pw::Allocator, or pw::allocator::Pool).

Inherits pw::Base.

Protected Member Functions

size_t DoGetAllocated () const override
 
std::optional< size_t > DoGetAllocatedBytes () const override
 
Result< Layout > DoGetInfo (typename Base::InfoType info_type, const void *ptr) const override
 

Member Function Documentation

◆ DoGetAllocated()

template<typename Base >
size_t pw::allocator::internal::BasicAbstractDeallocator< Base >::DoGetAllocated ( ) const
inlineoverrideprotected

Returns the total bytes that have been allocated by this allocator, or kGetAllocatedUnsupported if this allocator does not track its total allocated bytes.

Deprecated:
Use GetAllocatedBytes instead.

◆ DoGetAllocatedBytes()

template<typename Base >
std::optional< size_t > pw::allocator::internal::BasicAbstractDeallocator< Base >::DoGetAllocatedBytes ( ) const
inlineoverrideprotected

Returns the total bytes that have been allocated by this allocator, or std::nullopt if this allocator does not track its total allocated bytes.

◆ DoGetInfo()

template<typename Base >
Result< Layout > pw::allocator::internal::BasicAbstractDeallocator< Base >::DoGetInfo ( typename Base::InfoType  info_type,
const void *  ptr 
) const
inlineoverrideprotected

Returns deallocator-specific information about allocations.

Deallocators may support any number of InfoTypes. See that type for what each supported type returns.

Parameters
info_typeType of information to query. See InfoType.
ptrPointer to allocated memory, if needed for the given info_type.
Returns

The documentation for this class was generated from the following file: