Skip to content

Conversation

devnexen
Copy link
Contributor

  • MADV_PAGEOUT which reclaim the address range, swapping it out if the page is anonymous or written back to disk if it's backed up by a file.
  • MADV_COLD which deactivate the address range but as a hint.
  • MADV_WIPEONFORK after fork(), the address range is wiped out to avoid sharing sensible data between processes.
  • MADV_KEEPONFORK disables MADV_WIPEONFORK workflow.

@devnexen
Copy link
Contributor Author

@SteveLauC is it ok if, eventually, I do not add new tests there is no previous madvise test.

Copy link
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
Copy link
Member

is it ok if, eventually, I do not add new tests there is no previous madvise test.

Yeah, I think so. Having tests is great, but Nix, as a wrapper crate, only needs to ensure the wrappers work. These flags are just constants, not syscalls, they are guarded by the libc crate, so it is ok not to have tests for every constant 😄

- `MADV_PAGEOUT` which reclaim the address range, swapping it out
if the page is anonymous or written back to disk if it's backed up
by a file.
- `MADV_COLD` which deactivate the address range but as a hint.
- `MADV_WIPEONFORK` after `fork()`, the address range is wiped out
to avoid sharing sensible data between processes.
- `MADV_KEEPONFORK` disables `MADV_WIPEONFORK` workflow.
@devnexen devnexen marked this pull request as ready for review December 13, 2024 06:37
@SteveLauC SteveLauC enabled auto-merge December 13, 2024 06:58
@SteveLauC SteveLauC added this pull request to the merge queue Dec 13, 2024
Merged via the queue into nix-rust:master with commit b003c2f Dec 13, 2024
40 checks passed
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