boostorg / boostorg/interprocess

Add support for growing `mapped_region`

Ouverte
#253 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
C++
Étoiles
185
Forks
131
Métriques de merge des PR
Aucune PR mergée en 30 j

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Commencez par lire la classe mapped_region et la documentation mremap référencée pour Linux, NetBSD et Solaris. Étudiez les API propres à chaque plateforme, notamment la limitation de Windows mentionnée, puis définissez le comportement attendu pour l’agrandissement, la relocalisation, les plateformes non prises en charge et la macro de configuration de la bibliothèque. Le travail est considéré comme terminé lorsque mapped_region expose la fonctionnalité demandée de manière cohérente sur toutes les plateformes prises en charge.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
cpp, linux
Domaine
operating-systems
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
32/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.