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

Fix #418, malloc stub memalign calculation #419

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

jphickey
Copy link
Contributor

Checklist (Please check before submitting)

Describe the contribution
Correct the round-up memory alignment calculation in the stub "malloc" routine.

Fixes #418

Testing performed
Run all unit tests

Expected behavior changes
malloc stub now rounds up properly

System(s) tested on

  • Hardware: [e.g. PC, SP0, MCP750]
  • OS: [e.g. Ubuntu 18.04, RTEMS 4.11, VxWorks 6.9]
  • Versions: [e.g. cFE 6.6, OSAL 4.2, PSP 1.3 for mcp750, any related apps or tools]

Additional context
Same change as was submitted in nasa/osal#1413

It is likely this was never really used by tests, as this bug had been in there a long time and not noticed. At least with this it should work as intended if multiple blocks are allocated.

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

Correct the round-up memory alignment calculation in the
stub "malloc" routine.
@jphickey jphickey added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label Nov 13, 2023
@dzbaker dzbaker added CCB:Approved Indicates Approval by CCB and removed CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) labels Nov 30, 2023
@dzbaker dzbaker merged commit 375e090 into nasa:main Dec 5, 2023
11 checks passed
@jphickey jphickey deleted the fix-418-stub-memalign branch January 17, 2024 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCB:Approved Indicates Approval by CCB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory alignment issue in libc malloc stub
2 participants