ESPHome
2024.11.0
|
An STL allocator that uses SPI or internal RAM. More...
#include <helpers.h>
Public Types | |
enum | Flags { NONE = 0, ALLOC_EXTERNAL = 1 << 0, ALLOC_INTERNAL = 1 << 1, ALLOW_FAILURE = 1 << 2 } |
using | value_type = T |
Public Member Functions | |
RAMAllocator ()=default | |
RAMAllocator (uint8_t flags) | |
template<class U > | |
constexpr | RAMAllocator (const RAMAllocator< U > &other) |
T * | allocate (size_t n) |
void | deallocate (T *p, size_t n) |
An STL allocator that uses SPI or internal RAM.
Returns nullptr
in case no memory is available.
By setting flags, it can be configured to:
using esphome::RAMAllocator< T >::value_type = T |
enum esphome::RAMAllocator::Flags |
|
default |
|
inline |
|
inline |
|
inline |
|
inline |