-
Notifications
You must be signed in to change notification settings - Fork 164
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 an map_copy_read_only
API
#81
Comments
|
@zseri I am somewhat late to comment on this, but I think
is not correct as the Linux manual page for
concerning As a result of the discussion at https://users.rust-lang.org/t/how-unsafe-is-mmap/19635, I think we need another mapping mode that is sort of the converse of |
Yeah, I also noticed that... A far bigger problem is also that the underlying file can suddenly become truncated, and if the mapping is then read, it might fail with |
It's useful to be able to map a file
PROT_READ
andMAP_PRIVATE
on Linux. Later on you can make some pages writeable and write them, or use/proc/.../mem
to write them. Currentlymemmap
can do this but it takes two steps: amap_copy
followed bymake_read_only
, during which there's a short window when the pages are writeable.The text was updated successfully, but these errors were encountered: