34 #ifndef WSF_BUF_FREE_CHECK 35 #define WSF_BUF_FREE_CHECK TRUE 39 #ifndef WSF_BUF_ALLOC_BEST_FIT_FAIL_ASSERT 40 #define WSF_BUF_ALLOC_BEST_FIT_FAIL_ASSERT FALSE 44 #ifndef WSF_BUF_ALLOC_FAIL_ASSERT 45 #define WSF_BUF_ALLOC_FAIL_ASSERT TRUE 49 #ifndef WSF_BUF_STATS_HIST 50 #define WSF_BUF_STATS_HIST FALSE 58 #define WSF_BUF_STATS_MAX_LEN 128 61 #define WSF_BUF_STATS_MAX_POOL 32 64 #define WSF_BUF_ALLOC_FAILED 0x01 68 #define WSF_BUF_STATS FALSE uint8_t type
Type of error.
uint16_t bufSize
Pool buffer size.
uint8_t taskId
Task handler ID where failure occured.
Buffer pool descriptor structure.
uint8_t * WsfBufGetPoolOverFlowStats(void)
Diagnostic function to get the number of overflow times for each pool.
uint32_t WsfBufInit(uint32_t bufMemLen, uint8_t *pBufMem, uint8_t numPools, wsfBufPoolDesc_t *pDesc)
Initialize the buffer pool service. This function should only be called once upon system initializati...
uint8_t * WsfBufGetAllocStats(void)
Diagnostic function to get the buffer allocation statistics.
void WsfBufDiagRegister(wsfBufDiagCback_t callback)
Called to register the buffer diagnostics callback function.
uint8_t numAlloc
Number of outstanding allocations.
WSF buffer diagnostics - buffer allocation failure.
void WsfBufGetPoolStats(WsfBufPoolStat_t *pStat, uint8_t numPool)
Get statistics for each pool.
uint8_t numBuf
Total number of buffers.
uint16_t maxReqLen
Maximum requested buffer length.
uint8_t maxAlloc
High allocation watermark.
unsigned long uint32_t
Unsigned 32-bit value.
uint8_t WsfBufGetNumPool(void)
Get number of pools.
WSF buffer diagnostics message.
uint16_t len
Length of buffer being allocated.
unsigned short uint16_t
Unsigned 16-bit value.
void(* wsfBufDiagCback_t)(WsfBufDiag_t *pInfo)
Callback providing WSF buffer diagnostic messages.
uint16_t len
length of buffers in pool
wsfBufDiagAllocFail_t alloc
Buffer allocation failure.
uint8_t num
number of buffers in pool
void * WsfBufAlloc(uint16_t len)
Allocate a buffer.
unsigned char uint8_t
Unsigned 8-bit value.
void WsfBufFree(void *pBuf)
Free a buffer.