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

From: Rahguzar <[email-masked]>
Date: Thu, 25 Jul 2024 11:39:06 +0200

Hi Stefan,

Stefan Kangas <[email-masked]> writes:

> Rahguzar <[email-masked]> writes:
>
>> From discussion with Eli at the help-gnu-emacs thread I think there is
>> some hard coded assumption about 4KB page size in sysdep.c. E.g. here at
>> line 3741
>>
>> 	  pmem = 4.0 * 100 * rss / procfs_get_total_memory ();
>
> Makes sense to me.
>
> AFAIK, the page size can be different for different processes, so I
> guess we'd need to find the page size per process in something like
> /proc/<pid>/status?  Is that the right way to do it?
>
> I'm not on a GNU/Linux machine right now so I can't check.

Paul Eggert's changes fixed the issue for me.

Rahguzar