Skip to content

sys::mman: adding MREMAP_DONTUNMAP flag for mremap on Linux.#2555

Merged
SteveLauC merged 1 commit intonix-rust:masterfrom
devnexen:mman_update_linux
Dec 5, 2024
Merged

sys::mman: adding MREMAP_DONTUNMAP flag for mremap on Linux.#2555
SteveLauC merged 1 commit intonix-rust:masterfrom
devnexen:mman_update_linux

Conversation

@devnexen
Copy link
Copy Markdown
Contributor

@devnexen devnexen commented Dec 4, 2024

Is meant to be used with MREMAP_MAYMOVE and allow to not unmapping old_address.

What does this PR do

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

@devnexen devnexen marked this pull request as ready for review December 4, 2024 23:27
Copy link
Copy Markdown
Member

@SteveLauC SteveLauC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit:)

Comment thread src/sys/mman.rs Outdated
MREMAP_FIXED;
/// Works in conjunction with `MREMAP_MAYMOVE` but does not unmap `old_address`.
/// Note that, in this case, `old_size` and `new_size` must be the same.
/// [`mremap(2)`]: https://man7.org/linux/man-pages/man2/mremap.2.html
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to link the man page here, it was already there

Suggested change
/// [`mremap(2)`]: https://man7.org/linux/man-pages/man2/mremap.2.html

Is meant to be used with `MREMAP_MAYMOVE` and allow to not unmapping
`old_address`.
Copy link
Copy Markdown
Member

@SteveLauC SteveLauC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@SteveLauC SteveLauC added this pull request to the merge queue Dec 5, 2024
Merged via the queue into nix-rust:master with commit e7e9809 Dec 5, 2024
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

Successfully merging this pull request may close these issues.

2 participants