Skip to content

Commit a76e98e

Browse files
Fri3dNstuffandrewrk
authored andcommitted
remove length assertion from mprotect
1 parent c34cfe4 commit a76e98e

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

lib/std/posix.zig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4628,9 +4628,7 @@ pub const MProtectError = error{
46284628
OutOfMemory,
46294629
} || UnexpectedError;
46304630

4631-
/// `memory.len` must be page-aligned.
46324631
pub fn mprotect(memory: []align(mem.page_size) u8, protection: u32) MProtectError!void {
4633-
assert(mem.isAligned(memory.len, mem.page_size));
46344632
if (native_os == .windows) {
46354633
const win_prot: windows.DWORD = switch (@as(u3, @truncate(protection))) {
46364634
0b000 => windows.PAGE_NOACCESS,

0 commit comments

Comments
 (0)