Skip to content

Commit

Permalink
Merge pull request #166 from pipe01/dynamic-heap
Browse files Browse the repository at this point in the history
Add xPortGetHeapSize
  • Loading branch information
NeroBurner authored Dec 9, 2024
2 parents 832d38f + b2ac519 commit eedcaf4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sim/FreeRTOS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ void vPortFree( void *pv ) {
return free(pv);
}

size_t xPortGetHeapSize(void) {
return configTOTAL_HEAP_SIZE;
}

size_t xPortGetFreeHeapSize(void) {
return currentFreeHeap;
}
Expand Down
1 change: 1 addition & 0 deletions sim/FreeRTOS.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ void NVIC_SystemReset(void);

#define configTOTAL_HEAP_SIZE (1024 * 40)

size_t xPortGetHeapSize(void);
size_t xPortGetFreeHeapSize(void);
size_t xPortGetMinimumEverFreeHeapSize(void);

Expand Down

0 comments on commit eedcaf4

Please sign in to comment.