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