Add xPortGetFreeHeapSizeCaps and xPortGetMinimumEverFreeHeapSizeCaps plus everything it entails. Allows querying the available memory for various capabilities. Also: xPortGetFreeHeapSize and xPortGetMinimumEverFreeHeapSize now return the expected value. Bonus: the linked list used in the allocator is now 4 bytes smaller, which should save some memory.

This commit is contained in:
Jeroen Domburg
2016-12-09 17:13:45 +08:00
committed by Jeroen Domburg
parent 3f3cf397f7
commit 293ad4cd36
6 changed files with 175 additions and 137 deletions

View File

@@ -16,6 +16,9 @@
#include "freertos/FreeRTOS.h"
/* The maximum amount of tags in use */
#define HEAPREGIONS_MAX_TAGCOUNT 16
typedef struct HeapRegionTagged
{
@@ -28,7 +31,8 @@ typedef struct HeapRegionTagged
void vPortDefineHeapRegionsTagged( const HeapRegionTagged_t * const pxHeapRegions );
void *pvPortMallocTagged( size_t xWantedSize, BaseType_t tag );
size_t xPortGetMinimumEverFreeHeapSizeTagged( BaseType_t tag );
size_t xPortGetFreeHeapSizeTagged( BaseType_t tag );
#endif