Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heap: add new API to reset xMinimumEverFreeBytesRemaining. #1189

Merged

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]>
Copy link

sonarcloud bot commented Nov 11, 2024

@aggarg
Copy link
Member

aggarg commented Nov 11, 2024

@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]>
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