Add xPortGetFreeHeapSize() function.

This commit is contained in:
Richard Barry 2009-10-05 11:16:38 +00:00
parent 9468e36040
commit e90ba3e57f
5 changed files with 47 additions and 0 deletions

View file

@ -136,5 +136,12 @@ void vPortInitialiseBlocks( void )
/* Only required when static memory is not cleared. */
xNextFreeByte = ( size_t ) 0;
}
/*-----------------------------------------------------------*/
size_t xPortGetFreeHeapSize( void )
{
return ( configTOTAL_HEAP_SIZE - xNextFreeByte );
}