PlayRho  2.0.0
An interactive physics engine & library.
playrho::pmr Namespace Reference

Classes

class  memory_resource
 A limited implementation of the std::pmr::memory_resource type. More...
 
class  polymorphic_allocator
 Similar to a std::pmr::polymorphic_allocator. More...
 
struct  pool_options
 Options for memory pooling. More...
 
struct  PoolMemoryOptions
 Configurable options. More...
 
class  PoolMemoryResource
 Pool memory resource. More...
 
class  StatsResource
 Statistics memory resource. More...
 

Typedefs

using ssize_t = std::make_signed_t< std::size_t >
 Signed size type.
 

Functions

memory_resourceget_default_resource () noexcept
 Gets the default memory resource. More...
 
memory_resourcenew_delete_resource () noexcept
 Gets the new & delete using memory resource. More...
 
memory_resourcenull_memory_resource () noexcept
 Gets the "null" memory resource. More...
 
bool operator!= (const memory_resource &a, const memory_resource &b) noexcept
 Operator not-equals support. More...
 
template<class T1 , class T2 >
bool operator!= (const pmr::polymorphic_allocator< T1 > &lhs, const pmr::polymorphic_allocator< T2 > &rhs) noexcept
 Inequalality operator support.
 
constexpr bool operator!= (const PoolMemoryOptions &lhs, const PoolMemoryOptions &rhs) noexcept
 Operator not-equals support.
 
std::ostream & operator<< (std::ostream &os, const PoolMemoryResource::Stats &stats)
 Provide output streaming support for PoolMemoryResource::Stats.
 
bool operator== (const memory_resource &a, const memory_resource &b) noexcept
 Operator equals support. More...
 
template<class T1 , class T2 >
bool operator== (const pmr::polymorphic_allocator< T1 > &lhs, const pmr::polymorphic_allocator< T2 > &rhs) noexcept
 Equalality operator support.
 
constexpr bool operator== (const PoolMemoryOptions &lhs, const PoolMemoryOptions &rhs) noexcept
 Operator equals support.
 
memory_resourceset_default_resource (memory_resource *r) noexcept
 Sets the default memory resource. More...
 

Detailed Description

Name space for polymorphic memory resource related PlayRho names.

Name space for organizing custom allocator funtionality & supporting standard libraries that don't yet provide the memory_resource header file.

See also
: https://en.cppreference.com/w/cpp/header/memory_resource.

Function Documentation

◆ get_default_resource()

memory_resource * playrho::pmr::get_default_resource ( )
noexcept

◆ new_delete_resource()

memory_resource * playrho::pmr::new_delete_resource ( )
noexcept

Gets the new & delete using memory resource.

See also
https://en.cppreference.com/w/cpp/memory/new_delete_resource.

◆ null_memory_resource()

memory_resource * playrho::pmr::null_memory_resource ( )
noexcept

Gets the "null" memory resource.

See also
https://en.cppreference.com/w/cpp/memory/null_memory_resource.

◆ operator!=()

bool playrho::pmr::operator!= ( const memory_resource a,
const memory_resource b 
)
inlinenoexcept

◆ operator==()

bool playrho::pmr::operator== ( const memory_resource a,
const memory_resource b 
)
inlinenoexcept

◆ set_default_resource()

memory_resource * playrho::pmr::set_default_resource ( memory_resource r)
noexcept

Sets the default memory resource.

Postcondition
get_default_resource returns the value given.
See also
get_default_resource.
https://en.cppreference.com/w/cpp/memory/set_default_resource.