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

[Diagnostics] RAM usage diagnostic sources #1411

merged 2 commits into from Nov 1, 2017


Copy link

commented Oct 23, 2017

submission notes
**Important:** Please sanitize/remove any confidential info like usernames, passwords, org names, product names/ids, access tokens, client ids/secrets, or anything else you don't wish to share.

Please Read and Sign the Contributor License Agreement ([Info here](

You may also delete this submission notes header if you'd like. Thank you for contributing!

NOTE: This PR targets feature/diagnostics-merge branch


This PR adds the following diagnostic sources:

  • Total RAM: ID 25, Type: scalar(32)
    • Total amount of RAM available on the device in bytes. This value normally equals the size of the region shared by the heap and user application static RAM. Does not include static RAM in use by the system parts.
  • Used RAM: ID 26, Type: scalar(32)
    • Amount of RAM used out of "Total RAM" (user application static RAM + heap used).

Steps to Test

  • d command in listening mode

Example App



  • [CH8737]


  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to after merging (add links to docs and issues)
avtolstoy added 2 commits Oct 23, 2017
Updates HAL_Core_Runtime_Info to provide additional fields:
- total_heap
- total_init_heap
- max_used_heap
- user_static_ram
Adds RAM-related diagnostic sources:
- DIAG_ID_SYSTEM_TOTAL_RAM = 25, // sys:tram
- DIAG_ID_SYSTEM_USED_RAM = 26, // sys:uram

@avtolstoy avtolstoy force-pushed the feature/diag-ram-usage branch from 12b5511 to 8e39213 Oct 23, 2017


This comment has been minimized.

Copy link

commented Oct 24, 2017

@avtolstoy, what is missing is a "largest allocatable chuck" tool which could be an indicator for the amount of fragmentation in the heap.

@m-mcgowan m-mcgowan self-requested a review Oct 31, 2017

@m-mcgowan m-mcgowan added this to the 0.8.0 milestone Oct 31, 2017

@m-mcgowan m-mcgowan merged commit 8783d28 into feature/diagnostics-merge Nov 1, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed

@sergeuz sergeuz modified the milestones: 0.8.0, 0.10.0 Feb 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.