Project
Loading...
Searching...
No Matches
o2::its::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=std::pmr::get_default_resource())
 
 BoundedMemoryResource (ExternalAllocator *alloc)
 
voiddo_allocate (size_t bytes, size_t alignment) final
 
void do_deallocate (void *p, size_t bytes, size_t alignment) final
 
bool do_is_equal (const std::pmr::memory_resource &other) const noexcept final
 
size_t getUsedMemory () const noexcept
 
size_t getMaxMemory () const noexcept
 
void setMaxMemory (size_t max)
 
void print () const
 

Detailed Description

Definition at line 32 of file BoundedAllocator.h.

Constructor & Destructor Documentation

◆ BoundedMemoryResource() [1/2]

o2::its::BoundedMemoryResource::BoundedMemoryResource ( size_t  maxBytes = std::numeric_limits<size_t>::max(),
std::pmr::memory_resource upstream = std::pmr::get_default_resource() 
)
inline

Definition at line 59 of file BoundedAllocator.h.

◆ BoundedMemoryResource() [2/2]

o2::its::BoundedMemoryResource::BoundedMemoryResource ( ExternalAllocator alloc)
inline

Definition at line 61 of file BoundedAllocator.h.

Member Function Documentation

◆ do_allocate()

void * o2::its::BoundedMemoryResource::do_allocate ( size_t  bytes,
size_t  alignment 
)
inlinefinal

Definition at line 63 of file BoundedAllocator.h.

◆ do_deallocate()

void o2::its::BoundedMemoryResource::do_deallocate ( void p,
size_t  bytes,
size_t  alignment 
)
inlinefinal

Definition at line 85 of file BoundedAllocator.h.

◆ do_is_equal()

bool o2::its::BoundedMemoryResource::do_is_equal ( const std::pmr::memory_resource other) const
inlinefinalnoexcept

Definition at line 91 of file BoundedAllocator.h.

◆ getMaxMemory()

size_t o2::its::BoundedMemoryResource::getMaxMemory ( ) const
inlinenoexcept

Definition at line 97 of file BoundedAllocator.h.

◆ getUsedMemory()

size_t o2::its::BoundedMemoryResource::getUsedMemory ( ) const
inlinenoexcept

Definition at line 96 of file BoundedAllocator.h.

◆ print()

void o2::its::BoundedMemoryResource::print ( ) const
inline

Definition at line 108 of file BoundedAllocator.h.

◆ setMaxMemory()

void o2::its::BoundedMemoryResource::setMaxMemory ( size_t  max)
inline

Definition at line 98 of file BoundedAllocator.h.


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