LibC: Cache page size in getpagesize

This commit is contained in:
2026-08-05 05:41:31 +03:00
parent 328771ae29
commit 1a8351eae0
+3 -2
View File
@@ -676,8 +676,9 @@ int chroot(const char* path)
int getpagesize(void)
{
if (auto value = getauxval(AT_PAGESZ))
return value;
static int auxv_page_size = getauxval(AT_PAGESZ);
if (auxv_page_size)
return auxv_page_size;
return PAGE_SIZE;
}