Skip to content

Conversation

@TomasGalbickaNXP
Copy link
Contributor

Heap: add new API to reset xMinimumEverFreeBytesRemaining.

Description

This commit adds new API functionality to reset xMinimumEverFreeBytesRemaining.
This functionality provides ability to get heap statistics during a particular period of time.
For example, such use case could be required in a application that support FreeRTOS as OS and the software diagnostic cluster "reset watermarks" command.

Test Steps

  • Allocate 10 times 100 bytes [pvPortMalloc()].
  • xMinimumEverFreeBytesRemaining will decrease by 1000 bytes.
  • Free 5 times 100 bytes [vPortFree()].
  • xMinimumEverFreeBytesRemaining will remain unchanged.
  • Call xPortResetHeapMinimumEverFreeHeapSize()
  • xMinimumEverFreeBytesRemaining will be set to current free bytes remaining.

Checklist:

  • [ x ] I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

#1188

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This commit adds new API functionality to reset xMinimumEverFreeBytesRemaining.
This functionality provides ability to get heap statistics during a particular period of time.

Signed-off-by: Tomas Galbicka <[email protected]>
@sonarqubecloud
Copy link

@aggarg
Copy link
Member

aggarg commented Nov 11, 2024

Same API should be added to heap_5 as well? https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/portable/MemMang/heap_5.c#L458.

@aggarg aggarg merged commit 9736947 into FreeRTOS:main Nov 12, 2024
16 checks passed
aggarg added a commit to aggarg/FreeRTOS-Kernel that referenced this pull request Nov 12, 2024
The same was added to heap 4 in this PR - FreeRTOS#1189.

Signed-off-by: Gaurav Aggarwal <[email protected]>
tony-josi-aws pushed a commit that referenced this pull request Nov 13, 2024
The same was added to heap 4 in this PR - #1189.

Signed-off-by: Gaurav Aggarwal <[email protected]>
moninom1 pushed a commit to moninom1/FreeRTOS-Kernel that referenced this pull request Sep 30, 2025
…eRTOS#1189)

This PR enables the FreeRTOS Posix Blinky GCC Demo to be used without the configUSE_TRACE_FACILITY enabled. It is achieved by using `-DNO_TRACING=1` CMake option to disable tracing. By default, -DNO_TRACING is set to 0, and the tracing is enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants