modm API documentation
modm::allocator::Dynamic< T > Class Template Reference

#include <modm/utils/allocator.hpp>

Inheritance diagram for modm::allocator::Dynamic< T >:
modm::allocator::AllocatorBase< T >

Classes

struct  rebind
 

Public Member Functions

 Dynamic (const Dynamic &other)
 
template<typename U >
 Dynamic (const Dynamic< U > &)
 
T * allocate (size_t n)
 
void deallocate (T *p)
 

Static Public Member Functions

static void construct (T *p, const T &value)
 
static void destroy (T *p)
 

Detailed Description

template<typename T>
class modm::allocator::Dynamic< T >

Dynamic memory allocator

Wrapper for the underlying memory management. No additional management is done.

Author
Fabian Greif

Member Function Documentation

template<typename T >
static void modm::allocator::AllocatorBase< T >::construct ( T *  p,
const T &  value 
)
inheritedinlinestatic

Construct an object

Constructs an object of type T (the template parameter) on the location pointed by p using its copy constructor to initialize its value to value.

Notice that this does not allocate space for the element, it should already be available at p.

template<typename T >
static void modm::allocator::AllocatorBase< T >::destroy ( T *  p)
inheritedinlinestatic

Destroy an object

Destroys the object of type T (the template parameter) pointed by p.

Notice that this does not deallocate space for the element.


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