41 #ifdef HAVE_LIBTINYDTLS 90 #include <lwip/memp.h> 100 #define coap_malloc_type(type, size) memp_malloc(MEMP_ ## type) 101 #define coap_free_type(type, p) memp_free(MEMP_ ## type, p) 107 LWIP_ASSERT(
"coap_malloc must not be used in lwIP", 0);
111 LWIP_ASSERT(
"coap_free must not be used in lwIP", 0);
COAP_STATIC_INLINE void * coap_malloc(size_t size)
Wrapper function to coap_malloc_type() for backwards compatibility.
coap_memory_tag_t
Type specifiers for coap_malloc_type().
COAP_STATIC_INLINE void coap_free(void *object)
Wrapper function to coap_free_type() for backwards compatibility.
#define COAP_STATIC_INLINE
void * coap_malloc_type(coap_memory_tag_t type, size_t size)
Allocates a chunk of size bytes and returns a pointer to the newly allocated memory.
void coap_memory_init(void)
Initializes libcoap's memory management.
void coap_free_type(coap_memory_tag_t type, void *p)
Releases the memory that was allocated by coap_malloc_type().