esp8266ndn
NDN Arduino library for ESP8266 and more
|
Region with statically allocated memory. More...
#include <region.hpp>
Inherits ndnph::Region.
Public Member Functions | |
StaticRegion () | |
~StaticRegion ()=default | |
![]() | |
Region (uint8_t *buf, size_t cap) | |
uint8_t * | alloc (size_t size) |
Allocate a buffer with no alignment requirement. More... | |
uint8_t * | allocA (size_t size) |
Allocate a region aligned to multiple of sizeof(void*). More... | |
bool | free (const uint8_t *first, const uint8_t *last) |
Deallocate (part of) last allocated buffer. More... | |
bool | free (const uint8_t *ptr, size_t size) |
template<typename T , typename... Arg> | |
T * | make (Arg &&... arg) |
Allocate and create an item, and return its pointer. More... | |
template<typename RefType , typename... Arg> | |
RefType | create (Arg &&... arg) |
Allocate and create an object, and return its reference. More... | |
void | reset () |
Discard allocated items. More... | |
size_t | available () const |
Compute remaining space for alloc(). More... | |
size_t | availableA () const |
Compute remaining space for allocA(). More... | |
size_t | size () const |
Compute utilized space. More... | |
Additional Inherited Members | |
![]() | |
enum | { ALIGNMENT = sizeof(void*) } |
![]() | |
template<typename T > | |
static constexpr T | sizeofAligned (T size) |
![]() | |
uint8_t * | getArray () |
Region with statically allocated memory.
C | capacity. |
|
inline |
|
default |