\r
void vApplicationMallocFailedHook( void )\r
{\r
+static volatile uint32_t ulCount = 0;\r
+\r
/* vApplicationMallocFailedHook() will only be called if\r
configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h. It is a hook\r
function that will get called if a call to pvPortMalloc() fails.\r
heap available to pvPortMalloc() is defined by configTOTAL_HEAP_SIZE in\r
FreeRTOSConfig.h, and the xPortGetFreeHeapSize() API function can be used\r
to query the size of free heap space that remains (although it does not\r
- provide information on how the remaining heap might be fragmented). */\r
- vAssertCalled( __LINE__, __FILE__ );\r
+ provide information on how the remaining heap might be fragmented). \r
+ \r
+ Just count the number of malloc fails as some failures may occur simply\r
+ because the network load is very high, resulting in the consumption of a\r
+ lot of network buffers. */\r
+ ulCount++; \r
}\r
/*-----------------------------------------------------------*/\r
\r