| author | |
| committer | |
| log | a76e98e7d517037054fdf2edcb908c129465109f |
| tree | a7a55485dc79aaf6d21a742efccb0fb687f89ea1 |
| parent | c34cfe486d70ac5e92f101a47fc70a1336077e7e |
1 files changed, 0 insertions(+), 2 deletions(-)
lib/std/posix.zig-2| ... | ... | @@ -4628,9 +4628,7 @@ pub const MProtectError = error{ |
| 4628 | 4628 | OutOfMemory, |
| 4629 | 4629 | } || UnexpectedError; |
| 4630 | 4630 | |
| 4631 | /// `memory.len` must be page-aligned. | |
| 4632 | 4631 | pub fn mprotect(memory: []align(mem.page_size) u8, protection: u32) MProtectError!void { |
| 4633 | assert(mem.isAligned(memory.len, mem.page_size)); | |
| 4634 | 4632 | if (native_os == .windows) { |
| 4635 | 4633 | const win_prot: windows.DWORD = switch (@as(u3, @truncate(protection))) { |
| 4636 | 4634 | 0b000 => windows.PAGE_NOACCESS, |