Project
Loading...
Searching...
No Matches
o2::itsmft::tracking::BoundedMemoryResource Class Referencefinal

#include <BoundedAllocator.h>

Inherits std::pmr::memory_resource.

Classes

class  MemoryLimitExceeded
 

Public Member Functions

 BoundedMemoryResource (size_t maxBytes=std::numeric_limits< size_t >::max(), std::pmr::memory_resource *upstream=nullptr)
 
 BoundedMemoryResource (std::unique_ptr< std::pmr::memory_resource > upstream, size_t maxBytes=std::numeric_limits< size_t >::max())
 
size_t getUsedMemory () const noexcept
 
size_t getMaxMemory () const noexcept
 
size_t getThrowCount () const noexcept
 
size_t getPeakMemory () const noexcept
 
size_t getPeakMemoryDelta () const noexcept
 
void resetPeakMemory () noexcept
 
void setMaxMemory (size_t max)
 
std::string asString () const
 
void print () const
 

Static Public Member Functions

static std::pmr::memory_resourcecachingUpstream ()
 

Detailed Description

Definition at line 34 of file BoundedAllocator.h.

Constructor & Destructor Documentation

◆ BoundedMemoryResource() [1/2]

o2::itsmft::tracking::BoundedMemoryResource::BoundedMemoryResource ( size_t  maxBytes = std::numeric_limits<size_t>::max(),
std::pmr::memory_resource upstream = nullptr 
)

Definition at line 45 of file BoundedAllocator.cxx.

◆ BoundedMemoryResource() [2/2]

o2::itsmft::tracking::BoundedMemoryResource::BoundedMemoryResource ( std::unique_ptr< std::pmr::memory_resource upstream,
size_t  maxBytes = std::numeric_limits<size_t>::max() 
)

Definition at line 50 of file BoundedAllocator.cxx.

Member Function Documentation

◆ asString()

std::string o2::itsmft::tracking::BoundedMemoryResource::asString ( ) const

Definition at line 168 of file BoundedAllocator.cxx.

◆ cachingUpstream()

std::pmr::memory_resource * o2::itsmft::tracking::BoundedMemoryResource::cachingUpstream ( )
static

Definition at line 39 of file BoundedAllocator.cxx.

◆ getMaxMemory()

size_t o2::itsmft::tracking::BoundedMemoryResource::getMaxMemory ( ) const
noexcept

Definition at line 118 of file BoundedAllocator.cxx.

◆ getPeakMemory()

size_t o2::itsmft::tracking::BoundedMemoryResource::getPeakMemory ( ) const
noexcept

Definition at line 128 of file BoundedAllocator.cxx.

◆ getPeakMemoryDelta()

size_t o2::itsmft::tracking::BoundedMemoryResource::getPeakMemoryDelta ( ) const
noexcept

Definition at line 133 of file BoundedAllocator.cxx.

◆ getThrowCount()

size_t o2::itsmft::tracking::BoundedMemoryResource::getThrowCount ( ) const
noexcept

Definition at line 123 of file BoundedAllocator.cxx.

◆ getUsedMemory()

size_t o2::itsmft::tracking::BoundedMemoryResource::getUsedMemory ( ) const
noexcept

Definition at line 113 of file BoundedAllocator.cxx.

◆ print()

void o2::itsmft::tracking::BoundedMemoryResource::print ( ) const

Definition at line 195 of file BoundedAllocator.cxx.

◆ resetPeakMemory()

void o2::itsmft::tracking::BoundedMemoryResource::resetPeakMemory ( )
noexcept

Definition at line 140 of file BoundedAllocator.cxx.

◆ setMaxMemory()

void o2::itsmft::tracking::BoundedMemoryResource::setMaxMemory ( size_t  max)

Definition at line 147 of file BoundedAllocator.cxx.


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