Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • K kernel
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 23
    • Issues 23
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • redox-os
  • kernel
  • Merge requests
  • !143

Statically verify that addresses are page-aligned

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open jD91mZM2 requested to merge jD91mZM2/kernel:page-aligned into master Aug 07, 2020
  • Overview 0
  • Commits 4
  • Changes 8

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.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: page-aligned