MCPcopy Index your code
hub / github.com/StephanvanSchaik/mmap-rs

github.com/StephanvanSchaik/mmap-rs @0.7.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.7.0 ↗ · + Follow
177 symbols 349 edges 13 files 27 documented · 15%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

mmap-rs

CI Crates.io Docs

A cross-platform and safe Rust API to create and manage memory mappings in the virtual address space of the calling process. This crate can be used to create both file mappings and anonymous mappings. In addition, this crate supports the use of features such as huge pages, locking physical memory, etc. on platforms where those features are available. Furthermore, this crate allows you to enumerate the memory mappings of a process.

Changelog

View CHANGELOG.

Rust version requirements (MSRV)

mmap-rs supports rustc version 1.85 or greater since version 0.7.

Supported Platforms

Tier 1 (builds and tests are run in CI):

  • x86_64-pc-windows-msvc
  • x86_64-unknown-linux-gnu
  • i686-unknown-linux-gnu
  • aarch64-unknown-linux-gnu
  • armv7a-unknown-linux-gnueabihf
  • x86_64-apple-darwin
  • x86_64-unknown-freebsd

Tier 2 (builds are run in CI):

  • i686-pc-windows-msvc
  • aarch64-pc-windows-msvc
  • aarch64-linux-android
  • armv7-linux-androideabi
  • x86_64-linux-android
  • i686-linux-android
  • aarch64-apple-ios

Tier 3 (no CI, but should work):

  • aarch64-apple-darwin
  • x86_64-apple-ios
  • i686-unknown-freebsd

Features

  • [x] Anonymous memory maps.
  • [x] File-backed memory maps (unsafe - see documentation for details).
  • [x] Copy-on-write vs. shared memory maps.
  • [x] Inaccessible memory maps (using PROT_NONE and PAGE_NOACCESS).
  • [x] Read-only memory maps.
  • [x] Read-write memory maps.
  • [x] Executable memory maps.
  • [x] RWX memory maps for JIT purposes (unsafe - see documentation for details).
  • [x] Portable instruction cache flushing.
  • [x] Synchronous and asynchronous flushing.
  • [x] Support for locking physical memory.
  • [x] Huge page support.
  • [x] Stack support (also known as MAP_STACK on Unix).
  • [x] Support to exclude memory maps from core dumps (on Unix only).
  • [x] Reserve memory mappings, rather than directly committing them.
  • [x] Split and merge memory mappings.
  • [x] Query the memory areas of the current/a given process (for a given address or address range).

Core symbols most depended-on inside this repo

as_ptr
called by 21
src/os_impl/unix.rs
map
called by 19
src/os_impl/unix.rs
do_map
called by 10
src/os_impl/windows.rs
map
called by 9
src/mmap.rs
map_mut
called by 8
src/mmap.rs
with_file
called by 7
src/mmap.rs
split_off
called by 7
src/os_impl/unix.rs
hex_digit1
called by 6
src/os_impl/linux.rs

Shape

Method 131
Function 25
Class 19
Enum 2

Languages

Rust100%

Modules by API surface

src/os_impl/windows.rs46 symbols
src/os_impl/unix.rs42 symbols
src/mmap.rs34 symbols
src/areas.rs18 symbols
src/lib.rs15 symbols
src/os_impl/linux.rs11 symbols
src/os_impl/freebsd.rs4 symbols
src/os_impl/macos.rs3 symbols
src/error.rs1 symbols
examples/page_sizes.rs1 symbols
examples/map_anon.rs1 symbols
examples/areas.rs1 symbols

For agents

$ claude mcp add mmap-rs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page