modm API documentation
|
#include <modm/utils/allocator.hpp>
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) |
Dynamic memory allocator
Wrapper for the underlying memory management. No additional management is done.
|
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.
|
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.