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())
 
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 30 of file BoundedAllocator.h.

Constructor & Destructor Documentation

◆ BoundedMemoryResource()

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 57 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 60 of file BoundedAllocator.h.

◆ do_deallocate()

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

Definition at line 75 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 81 of file BoundedAllocator.h.

◆ getMaxMemory()

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

Definition at line 87 of file BoundedAllocator.h.

◆ getUsedMemory()

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

Definition at line 86 of file BoundedAllocator.h.

◆ print()

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

Definition at line 97 of file BoundedAllocator.h.

◆ setMaxMemory()

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

Definition at line 88 of file BoundedAllocator.h.


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