40#ifndef NET_MEM_POOL_SUPPORT
41 #define NET_MEM_POOL_SUPPORT DISABLED
42#elif (NET_MEM_POOL_SUPPORT != ENABLED && NET_MEM_POOL_SUPPORT != DISABLED)
43 #error NET_MEM_POOL_SUPPORT parameter is not valid
47#ifndef NET_MEM_POOL_BUFFER_COUNT
48 #define NET_MEM_POOL_BUFFER_COUNT 32
49#elif (NET_MEM_POOL_BUFFER_COUNT < 1)
50 #error NET_MEM_POOL_BUFFER_COUNT parameter is not valid
54#ifndef NET_MEM_POOL_BUFFER_SIZE
55 #define NET_MEM_POOL_BUFFER_SIZE 1536
56#elif (NET_MEM_POOL_BUFFER_SIZE < 128)
57 #error NET_MEM_POOL_BUFFER_SIZE parameter is not valid
61#define CHUNKED_BUFFER_HEADER_SIZE (sizeof(NetBuffer) + MAX_CHUNK_COUNT * sizeof(ChunkDesc))
64#define N(size) (((size) + NET_MEM_POOL_BUFFER_SIZE - 1) / NET_MEM_POOL_BUFFER_SIZE)
106void *memPoolAlloc(
size_t size);
107void memPoolFree(
void *p);
108void memPoolGetStats(uint_t *currentUsage, uint_t *maxUsage, uint_t *size);
113size_t netBufferGetLength(
const NetBuffer *buffer);
116void *netBufferAt(
const NetBuffer *buffer,
size_t offset);
119 const NetBuffer *src,
size_t srcOffset,
size_t length);
122 const NetBuffer *src,
size_t srcOffset,
size_t length);
127 size_t destOffset,
const void *src,
size_t length);
129size_t netBufferRead(
void *dest,
const NetBuffer *src,
130 size_t srcOffset,
size_t length);
error_t
Error codes.
Definition error.h:43
CycloneTCP configuration file.
Structure describing a chunk of data.
Definition net_mem.h:77
Structure describing a buffer that spans multiple chunks.
Definition net_mem.h:89