Add support for growing `mapped_region`

Open
#253 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
32/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp, linux

Research direction

Start by reading the mapped_region class and the referenced mremap documentation for Linux, NetBSD, and Solaris. Investigate the platform-specific APIs, including the noted Windows limitation, then define how growing, relocating, unsupported platforms, and the library configuration macro should behave. Done means mapped_region exposes the requested functionality consistently across supported platforms.

Written by the indexing model from the issue text.

Description

Linux, NetBSD and Solaris have a mremap system call that allows to opportunistically grow or relocate the existing memory mapping. There also seems to be a way to achieve this on Windows, but I'm not familiar with that API.

Please, add support for this functionality (specifically, growing and/or relocating a memory mapping) to the mapped_region class. For example, add a grow_by method that would try to increase the size of the mapped region at the same address and remap to relocate the region at a different address and size. On platforms that don't support this functionality, the new methods would always fail. This would also be indicated at compile time by some library-defined config macro.

Dominant language
C++
Stars
185
Forks
131
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/interprocess

All issues in boostorg/interprocess

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.