proxygen
CountedAllocator< T > Class Template Reference
Inheritance diagram for CountedAllocator< T >:

Public Member Functions

 CountedAllocator (CountedAllocatorStats &stats) noexcept
 
void deallocate (T *p, size_t n)
 

Private Attributes

CountedAllocatorStatsstats_
 

Detailed Description

template<typename T>
class CountedAllocator< T >

Definition at line 193 of file MemoryTest.cpp.

Constructor & Destructor Documentation

template<typename T >
CountedAllocator< T >::CountedAllocator ( CountedAllocatorStats stats)
inlineexplicitnoexcept

Definition at line 198 of file MemoryTest.cpp.

199  : stats_(&stats) {}
CountedAllocatorStats * stats_
Definition: MemoryTest.cpp:195

Member Function Documentation

template<typename T >
void CountedAllocator< T >::deallocate ( T p,
size_t  n 
)
inline

Definition at line 200 of file MemoryTest.cpp.

References CountedAllocatorStats::deallocates.

200  {
201  std::allocator<T>::deallocate(p, n);
202  ++stats_->deallocates;
203  }
CountedAllocatorStats * stats_
Definition: MemoryTest.cpp:195

Member Data Documentation

template<typename T >
CountedAllocatorStats* CountedAllocator< T >::stats_
private

Definition at line 195 of file MemoryTest.cpp.


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