Why does Python want to read /proc/meminfo

Ian Pilcher arequipeno at gmail.com
Sat May 6 12:07:34 EDT 2017


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.

Delightful.

-- 
========================================================================
Ian Pilcher                                         arequipeno at gmail.com
-------- "I grew up before Mark Zuckerberg invented friendship" --------
========================================================================



More information about the Python-list mailing list