buffer-management API Callbacks

Functions

void * emberAllocateMemoryForPacketHandler (uint32_t size, void **objectRef)
This function can be used to hook an external memory allocator into the stack. It will be called when we need to allocate large packets.
void emberFreeMemoryForPacketHandler (void *objectRef)
This handler is called when freeing memory allocated with emberAllocateMemoryForPacketHandler .
void emberMarkApplicationBuffersHandler (void)
Applications that use buffers must mark them by defining this function. The stack uses this when reclaiming unused buffers.

Detailed Description

These callbacks were contributed by the buffer-management API.

Function Documentation

void* emberAllocateMemoryForPacketHandler ( uint32_t size,
void ** objectRef
)

If a value other than NULL is returned that pointer will be used to store packet data. You must also fill in the objectRef parameter with whatever reference you would like passed to the emberFreeMemoryForPacketHandler() when we're done with this memory. If you set the objectRef to NULL then the free handler will not be called.

Parameters
size size of packet data
objectRef Reference of the memory to be used in emberFreeMemoryForPacketHandler
Returns
pointer that stores the packet data

References NULL .

void emberFreeMemoryForPacketHandler ( void * objectRef )
Parameters
objectRef Reference used in emberAllocateMemoryForPacketHandler
void emberMarkApplicationBuffersHandler ( void )