Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support POSIX MAP_FIXED #35

Open
ShaneEverittM opened this issue Oct 29, 2021 · 5 comments
Open

Support POSIX MAP_FIXED #35

ShaneEverittM opened this issue Oct 29, 2021 · 5 comments

Comments

@ShaneEverittM
Copy link

Would it be possible to support this flag? Currently the much older crate mmap supports it, but it hasn't been updated in 6 years (!).

@RazrFalcon
Copy link
Owner

Why do you need it?

Anyway, patches are welcome.

@ShaneEverittM
Copy link
Author

It's kind of an niche use case, I'm playing around with writing a ELF loader. I could submit a patch, but it would be just for me. Though as I work on it more I probably won't need to use MAP_FIXED it's kind of a hack.

@adamreichold
Copy link

I think the main point of this crate is providing a portable abstraction of the memory mapping facilities available on Unix- and Windows-like operating systems. I suspect that your ELF loader does not have those portability requirements? Maybe using a Unix-specific lower level crate like nix or libc would be a better choice due to this?

@norcalli
Copy link

norcalli commented Oct 4, 2023

There's already flagged things like mremap which are under #[cfg(linux)], so adding MAP_FIXED under a flag seems like not that big of a stretch.

@RazrFalcon
Copy link
Owner

@norcalli The are OS-specific stuff now, but not 2 years ago.

Either way, patches are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants