buffer-management API Callbacks


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.

sizesize of packet data
objectRefReference of the memory to be used in emberFreeMemoryForPacketHandler
pointer that stores the packet data

References NULL.

void emberFreeMemoryForPacketHandler ( void *  objectRef)
objectRefReference used in emberAllocateMemoryForPacketHandler
void emberMarkApplicationBuffersHandler ( void  )