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

@ -105,7 +105,7 @@ static size_t __get_stack_size(int pagesz, uintptr_t start, uintptr_t top) {
* This function works on every OS except Windows.
*/
struct AddrSize __get_main_stack(void) {
int pagesz = getpagesize();
int pagesz = __pagesize;
uintptr_t start = (uintptr_t)__argv;
uintptr_t top = __get_main_top(pagesz);
uintptr_t bot = top - __get_stack_size(pagesz, start, top);