| ... | @@ -1883,7 +1883,16 @@ pub fn inotify_rm_watch(inotify_fd: i32, wd: i32) void { | ... | @@ -1883,7 +1883,16 @@ pub fn inotify_rm_watch(inotify_fd: i32, wd: i32) void { |
| 1883 | } | 1883 | } |
| 1884 | | 1884 | |
| 1885 | pub const MProtectError = error{ | 1885 | pub const MProtectError = error{ |
| | 1886 | /// The memory cannot be given the specified access. This can happen, for example, if you |
| | 1887 | /// mmap(2) a file to which you have read-only access, then ask mprotect() to mark it |
| | 1888 | /// PROT_WRITE. |
| 1886 | AccessDenied, | 1889 | AccessDenied, |
| | 1890 | |
| | 1891 | /// Changing the protection of a memory region would result in the total number of map‐ |
| | 1892 | /// pings with distinct attributes (e.g., read versus read/write protection) exceeding the |
| | 1893 | /// allowed maximum. (For example, making the protection of a range PROT_READ in the mid‐ |
| | 1894 | /// dle of a region currently protected as PROT_READ|PROT_WRITE would result in three map‐ |
| | 1895 | /// pings: two read/write mappings at each end and a read-only mapping in the middle.) |
| 1887 | OutOfMemory, | 1896 | OutOfMemory, |
| 1888 | Unexpected, | 1897 | Unexpected, |
| 1889 | }; | 1898 | }; |