Skip to content
Snippets Groups Projects

Statically verify that addresses are page-aligned

Closed jD91mZM2 requested to merge jD91mZM2/kernel:page-aligned into master

A bit of an experiment, because I'm not really happy with fmap/funmap's rounding because it's not obvious what is already page-aligned and what isn't.

This data type will only ever hold page-aligned numbers (numbers that are divisible by PAGE_SIZE). The runtime check/rounding is executed once, and after that the type-checker takes over to ensure we only perform safe actions.

This type offers a way to add/subtract multiples while retaining the page-aligned type, since kx + ky = kz. More safe operations should be implemented, as needed.

The goal for this type is to slowly consume more parts of Redox OS' memory logic, eventually making it easy to verify with a simple glance that code is correct.

Merge request reports

Approval is optional

Closed by RibbonRibbon 2 years ago (Mar 7, 2023 10:05am UTC)

Merge details

  • The changes were not merged into master.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading