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

Dwell Table instantiated on stack, but not used #59

Closed
2 tasks done
jphickey opened this issue Dec 1, 2023 · 0 comments · Fixed by #60
Closed
2 tasks done

Dwell Table instantiated on stack, but not used #59

jphickey opened this issue Dec 1, 2023 · 0 comments · Fixed by #60

Comments

@jphickey
Copy link
Contributor

jphickey commented Dec 1, 2023

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.

Describe the bug
During init, the MD app instantiates a dwell table on the stack, and memset's it to 0:

MD_DwellTableLoad_t InitMemDwellTable;

However this is not anywhere for any purpose. It may be a remnant that was never cleaned up.

As a result, its using several kB of stack space unnecessarily.

Expected behavior
Should not allocate objects that are not necessary.

System observed on:
Debian

Additional context
This was discovered by analyzing the stack usage and finding that MD sometimes overran its allocated stack. Although there were other issues as well (see nasa/osal#1429) ... it was noted that this unneeded object was a significant contributor for why the problem showed up in MD and not other apps.

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

jphickey added a commit to jphickey/MD that referenced this issue Dec 1, 2023
Remove the Initial dwell table object from MD_InitTableServices.
This object was not actually used, and consumed several kB of
stack space unnecessarily, depending on the size of the table.
jphickey added a commit to jphickey/MD that referenced this issue Dec 1, 2023
Remove the Initial dwell table object from MD_InitTableServices.
This object was not actually used, and consumed several kB of
stack space unnecessarily, depending on the size of the table.
dzbaker added a commit that referenced this issue Dec 7, 2023
Fix #59, remove unneeded stack object
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 a pull request may close this issue.

1 participant