Skip to content

Commit 387d934

Browse files
committed
Add min bytes assert for uxMaxNetworkInterfaceAllocatedSizeBytes
1 parent 6dfb866 commit 387d934

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

source/portable/BufferManagement/BufferAllocation_1.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,9 @@ BaseType_t xNetworkBuffersInitialise( void )
205205
* requirements. */
206206
uxMaxNetworkInterfaceAllocatedSizeBytes = uxNetworkInterfaceAllocateRAMToBuffers( xNetworkBuffers );
207207

208+
/* The allocated buffer should hold atleast ipconfigNETWORK_MTU + ipSIZE_OF_ETH_HEADER bytes */
209+
configASSERT((uxMaxNetworkInterfaceAllocatedSizeBytes >= (ipconfigNETWORK_MTU + ipSIZE_OF_ETH_HEADER)))
210+
208211
for( x = 0U; x < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; x++ )
209212
{
210213
/* Initialise and set the owner of the buffer list items. */

0 commit comments

Comments
 (0)