Subject: bug#72278: 29.4; Proced reports incorrect results with 16KB page size

From: Paul Eggert <[email-masked]>
Date: Thu, 25 Jul 2024 07:47:56 -0700

On 2024-07-25 02:55, Stefan Kangas wrote:
> On Linux, page sizes can vary per process ("multiple page size
> support").  Should we bother with that?

I thought that support didn't change what getpagesize returns or what 
/proc/PID/stat reports, at least not in mainline Linux kernels. Am I 
missing something?

> I also note that the man page for getpagesize says this:
> 
>      This call first appeared in 4.2BSD.  SVr4, 4.4BSD, SUSv2.  In
>      SUSv2 the getpagesize() call was labeled LEGACY, and it was
>      removed in POSIX.1-2001.

Emacs uses getpagesize in other places. I suppose we should change them 
all to sysconf (_SC_PAGESIZE) on the off chance that there's a platform 
somewhere where page sizes exceed 1 GiB. I don't know of any such 
platform now, probably because so much software still uses getpagesize....