Commit 57700b9a authored by Austin Seipp's avatar Austin Seipp
Browse files

Fix getPageSize to actually cache the page size.



This fixes #8289.
Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
parent d1594465
...@@ -251,14 +251,15 @@ W_ getPageSize (void) ...@@ -251,14 +251,15 @@ W_ getPageSize (void)
{ {
static W_ pageSize = 0; static W_ pageSize = 0;
if (pageSize) { if (pageSize) {
return pageSize; return pageSize;
} else { } else {
long ret; long ret;
ret = sysconf(_SC_PAGESIZE); ret = sysconf(_SC_PAGESIZE);
if (ret == -1) { if (ret == -1) {
barf("getPageSize: cannot get page size"); barf("getPageSize: cannot get page size");
} }
return ret; pageSize = ret;
return ret;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment