NetBurner 3.5.0
PDF Version |
|
Functions | |
uint16_t | GetFreeCount () |
Returns the number of free buffers in the system. Buffers are used for both serial and network interfaces. | |
void | ShowBuffer (PoolPtr p) |
Prints a pool buffer to stdout. | |
#include< buffers.h >
Functions associated with the buffers allocated for use by network interfaces and serial ports. If a system runs out of buffers it will no longer be able to send or receive network data.
uint16_t GetFreeCount | ( | ) |
#include <buffers.h>
Returns the number of free buffers in the system. Buffers are used for both serial and network interfaces.
This function returns the number of free pool buffers, which are used for network and serial communication. The maximum number of buffers is defined in \nburn\nbrtos\include\constants.h
:
The size of each buffer is defined as:
If the number of free buffers reaches zero, then no further network communication will be possible until some buffers are freed. This is a good function to use as a debug tool for detecting buffer leaks in your application.
Serial ports also use buffers, which are allocated in constants.h:
Each serial port buffer is equal in size to an Ethernet buffer.