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

Add madvise wrapper #51

Closed
wants to merge 2 commits into from
Closed

Conversation

eira-fransham
Copy link

This doesn't have docs for AccessPattern yet and hasn't been properly tested, but it's a start. Worth getting some critique early. It also explicitly only implements the POSIX madvise flags instead of including the Linux extensions, although that would definitely be a good thing to add.

@danburkert
Copy link
Owner

Hi @Vurich, I've previously said it would be interesting to have a madvise wrapper in memmap, but I'm going to play the opposite side for a moment and argue against it. I think this functionality might be better exposed in a generic way outside this crate, because it's not really specific to memory maps, and the implementation is not tied to the memory map internals at all. Is there a compelling reason to tie it to memory maps that I'm overlooking?

@eira-fransham
Copy link
Author

No, I think you're right. It could be implemented as a method on [u8] with very little syntactic overhead.

@eira-fransham
Copy link
Author

Made this into a seperate crate here.

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