boostorg / boostorg/interprocess

Add support for growing `mapped_region`

Open
#253 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
185
Forks
131
PR merge metrics
No merged PRs in 30d

Description

[Linux](https://linux.die.net/man/2/mremap), [NetBSD](https://man.freebsd.org/cgi/man.cgi?query=mremap&apropos=0&sektion=0&manpath=NetBSD+10.1&arch=default&format=html) and [Solaris](https://docs.oracle.com/cd/E88353_01/html/E37841/mremap-2.html) 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](https://stackoverflow.com/questions/17197615/no-mremap-for-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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.