[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/9] getpagesize: improve doc
From: |
Paul Eggert |
Subject: |
[PATCH 1/9] getpagesize: improve doc |
Date: |
Fri, 14 Jun 2024 13:19:42 -0700 |
* doc/glibc-functions/getpagesize.texi:
Mention portability problems not fixed by Gnulib.
---
ChangeLog | 6 ++++++
doc/glibc-functions/getpagesize.texi | 13 +++++++++++++
2 files changed, 19 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index f44aab79f6..9d06cc7eac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-06-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ getpagesize: improve doc
+ * doc/glibc-functions/getpagesize.texi:
+ Mention portability problems not fixed by Gnulib.
+
2024-06-14 Bruno Haible <bruno@clisp.org>
vasnprintf: Reject a width > INT_MAX.
diff --git a/doc/glibc-functions/getpagesize.texi
b/doc/glibc-functions/getpagesize.texi
index 7b40f5e48d..77df489bce 100644
--- a/doc/glibc-functions/getpagesize.texi
+++ b/doc/glibc-functions/getpagesize.texi
@@ -33,5 +33,18 @@ mingw.
@end itemize
Portability problems not fixed by Gnulib:
+
@itemize
+@item
+The function has never been in POSIX and was removed from the Single
+UNIX Specification in SUSv3 (2001).
+Although portable programs are supposed to use @code{sysconf (_SC_PAGESIZE)}
+instead, in practice @code{getpagesize} can be a little faster.
+
+@item
+On typical platforms this function's API limits page sizes to at most 1 GiB@,
+even though @code{sysconf (_SC_PAGESIZE)} does not have this limitation.
+However, this has not been a practical problem yet,
+and so many programs use @code{getpagesize} that it's unlikely that
+new platforms would introduce larger page sizes any time soon.
@end itemize
--
2.45.2
- [PATCH 0/9] getpagesize simplifications etc., Paul Eggert, 2024/06/14
- [PATCH 3/9] getcwd: simplify abort bug checking, Paul Eggert, 2024/06/14
- [PATCH 4/9] memchr,strncat: prefer sysconf (_SC_PAGESIZE), Paul Eggert, 2024/06/14
- [PATCH 5/9] mprotect: don’t assume pointers fit in long, Paul Eggert, 2024/06/14
- [PATCH 6/9] maint: avoid some test getpagesize dependencies, Paul Eggert, 2024/06/14