Skip to content

Move MSB check after final size calculation #463

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

Merged
merged 1 commit into from
Feb 28, 2022

Conversation

aggarg
Copy link
Member

@aggarg aggarg commented Feb 27, 2022

Description

We use the MSB of the size member of a BlockLink_t to track whether not a block is allocated. Consequently, the size must not be so large that the MSB is set. The check to see if the MSB in the size is set needs to be done after the final size (metadata + alignment) is calculated.

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

We use the MSB of the size member of a BlockLink_t to track whether not
a block is allocated. Consequently, the size must not be so large that
the MSB is set. The check to see if the MSB in the size is set needs to
be done after the final size (metadata + alignment) is calculated.

Signed-off-by: Gaurav Aggarwal <[email protected]>
@aggarg aggarg requested a review from a team as a code owner February 27, 2022 04:19
@codecov
Copy link

codecov bot commented Feb 27, 2022

Codecov Report

Merging #463 (d21ba87) into main (82be779) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #463   +/-   ##
=======================================
  Coverage   92.44%   92.44%           
=======================================
  Files           4        4           
  Lines        1270     1270           
  Branches      343      343           
=======================================
  Hits         1174     1174           
  Misses         50       50           
  Partials       46       46           
Flag Coverage Δ
unittests 92.44% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 82be779...d21ba87. Read the comment docs.

@aggarg aggarg merged commit 8eb3585 into FreeRTOS:main Feb 28, 2022
@aggarg aggarg deleted the heap_allocated_check branch February 28, 2022 19:59
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