Thanks to visit codestin.com
Credit goes to github.com

Skip to content

New mem align and align_up methods #1051

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 6 commits into from
Dec 29, 2021
Merged

Conversation

elicn
Copy link
Member

@elicn elicn commented Dec 28, 2021

Normally an alignment method would round values down to the alignment boundary. The current mem.align functionality, however, rounds values up - which is a bit unexpected. This PR changes mem.align to round values down as one would expect, and adds a new method mem.round_up to retain the old functionality in a more intuitive way.

Changes:

  • Rename mem.align to mem.align_up
  • Implement a new mem.align method
  • Accomodate usages to the new functionlity
  • Use mem.align and mem.align_up where appropriate (code de-duplication)

@elicn elicn marked this pull request as ready for review December 29, 2021 00:06
@kabeor kabeor merged commit c6a0264 into qilingframework:dev Dec 29, 2021
@elicn elicn deleted the mem-align branch December 29, 2021 10:05
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