Why does Python want to read /proc/meminfo

Michael Torrie torriem at gmail.com
Sat May 6 21:06:52 EDT 2017


On 05/06/2017 10:07 AM, Ian Pilcher wrote:
> On 05/06/2017 12:51 AM, dieter wrote:
>> Personally, I doubt that you will find a reference.
>> Instead, I assume that the reference comes from the C runtime library.
>> It might hepl optimize memory management to know about "meminfo" details.
> 
> You're right.  Seems that it's glibc's qsort().
> 
> So it seems that any service written in Python (or any other program
> that uses qsort) needs to be given read access to most of /proc or deal
> with the (unspecified) consequences of not allowing qsort() to determine
> the amount of memory in the system.

"most of /proc?"  I thought you said it just needs to read meminfo,
which I hardly can see a problem with.




More information about the Python-list mailing list