Project
Loading...
Searching...
No Matches
o2::gtrk::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
 
size_t resetPeakMemory () noexcept
 
void raisePeakMemory (size_t peak) noexcept
 
size_t getAllocationCount () const noexcept
 
size_t getAllocatedBytes () const noexcept
 
void setMaxMemory (size_t max)
 
std::string asString () const
 
void print () const
 

Static Public Member Functions

static std::pmr::memory_resource * cachingUpstream ()
 

Detailed Description

Definition at line 38 of file BoundedAllocator.h.

Constructor & Destructor Documentation

◆ BoundedMemoryResource() [1/2]

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

Definition at line 48 of file BoundedAllocator.cxx.

◆ BoundedMemoryResource() [2/2]

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

Definition at line 53 of file BoundedAllocator.cxx.

Member Function Documentation

◆ asString()

std::string o2::gtrk::BoundedMemoryResource::asString ( ) const

Definition at line 187 of file BoundedAllocator.cxx.

◆ cachingUpstream()

std::pmr::memory_resource * o2::gtrk::BoundedMemoryResource::cachingUpstream ( )
static

Definition at line 42 of file BoundedAllocator.cxx.

◆ getAllocatedBytes()

size_t o2::gtrk::BoundedMemoryResource::getAllocatedBytes ( ) const
inlinenoexcept

Definition at line 69 of file BoundedAllocator.h.

◆ getAllocationCount()

size_t o2::gtrk::BoundedMemoryResource::getAllocationCount ( ) const
inlinenoexcept

Definition at line 68 of file BoundedAllocator.h.

◆ getMaxMemory()

size_t o2::gtrk::BoundedMemoryResource::getMaxMemory ( ) const
noexcept

Definition at line 130 of file BoundedAllocator.cxx.

◆ getPeakMemory()

size_t o2::gtrk::BoundedMemoryResource::getPeakMemory ( ) const
noexcept

Definition at line 140 of file BoundedAllocator.cxx.

◆ getPeakMemoryDelta()

size_t o2::gtrk::BoundedMemoryResource::getPeakMemoryDelta ( ) const
noexcept

Definition at line 145 of file BoundedAllocator.cxx.

◆ getThrowCount()

size_t o2::gtrk::BoundedMemoryResource::getThrowCount ( ) const
noexcept

Definition at line 135 of file BoundedAllocator.cxx.

◆ getUsedMemory()

size_t o2::gtrk::BoundedMemoryResource::getUsedMemory ( ) const
noexcept

Definition at line 125 of file BoundedAllocator.cxx.

◆ print()

void o2::gtrk::BoundedMemoryResource::print ( ) const

Definition at line 214 of file BoundedAllocator.cxx.

◆ raisePeakMemory()

void o2::gtrk::BoundedMemoryResource::raisePeakMemory ( size_t  peak)
noexcept

Definition at line 159 of file BoundedAllocator.cxx.

◆ resetPeakMemory()

size_t o2::gtrk::BoundedMemoryResource::resetPeakMemory ( )
noexcept

Definition at line 152 of file BoundedAllocator.cxx.

◆ setMaxMemory()

void o2::gtrk::BoundedMemoryResource::setMaxMemory ( size_t  max)

Definition at line 166 of file BoundedAllocator.cxx.


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