mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 15:28:30 +00:00
Create variables for page size
This commit is contained in:
parent
23dfb79d33
commit
567d8fe32d
34 changed files with 137 additions and 101 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue