boostorg / boostorg/interprocess
Add support for growing `mapped_region`
- Vorherrschende Sprache
- C++
- Sterne
- 185
- Forks
- 131
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
[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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne damit, die Klasse mapped_region und die referenzierte mremap-Dokumentation für Linux, NetBSD und Solaris zu lesen. Untersuche die plattformspezifischen APIs, einschließlich der genannten Windows-Einschränkung, und lege anschließend fest, wie das Vergrößern, das Verschieben, nicht unterstützte Plattformen und das Bibliothekskonfigurationsmakro sich verhalten sollen. Als erledigt gilt die Aufgabe, wenn mapped_region die angeforderte Funktionalität auf allen unterstützten Plattformen konsistent bereitstellt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp, linux
- Bereich
- operating-systems
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 32/100