Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • O OSKernel2026-StellaOS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • StellaOS
  • OSKernel2026-StellaOS
  • Merge requests
  • !21

feat(mmap): full MAP_* support + page_cache integration

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged StellaOS requested to merge feat/mmap into main Jun 01, 2026
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 2

Based on latest main (cf2a0718) with page_cache already merged.

  • MapBackend::FileBacked: add shared:bool field
  • sys_mmap: parse MAP_SHARED/PRIVATE/ANONYMOUS/FIXED flags; anonymous mapping (fd=-1) uses MapBackend::Anonymous; validate prot vs fd open mode (EACCES); reject illegal SHARED+PRIVATE combos (EINVAL); check offset alignment.
  • Page fault: use file_page_load(file, pgoff) from page_cache; MAP_SHARED+Writable marks page.dirty for write-back.
  • fork_cow: MAP_SHARED areas skip COW — share physical frame with writable PTE (dirty tracked via page.dirty).
  • munmap: call file_page_sync(file) before unmapping MAP_SHARED.
  • sys_msync: full implementation via file_page_sync.
  • Added MemorySet::find_area_mut helper.

NOTE: mmap_base shares starting address with heap_bottom (ProcessControlBlockInner::new) — long-term address space collision risk.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feat/mmap