Create variables for page size

This commit is contained in:
Justine Tunney 2024-07-18 21:02:59 -07:00
parent 23dfb79d33
commit 567d8fe32d
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
34 changed files with 137 additions and 101 deletions

View file

@ -60,7 +60,7 @@ int __mprotect(char *addr, size_t size, int prot) {
return 0;
// unix checks prot before checking size
int pagesz = getpagesize();
int pagesz = __pagesize;
if (((intptr_t)addr & (pagesz - 1)) || (uintptr_t)addr + size < size)
return einval();