[PATCH] getsysstats: use sysinfo() instead of parsing /proc/meminfo

Rasmus Villemoes rv@rasmusvillemoes.dk
Fri Aug 14 12:04:00 GMT 2015


On Thu, Aug 13 2015, Joseph Myers <joseph@codesourcery.com> wrote:

> On Thu, 13 Aug 2015, Rasmus Villemoes wrote:
>
>> +sysinfo_mempages(unsigned long int num, unsigned int mem_unit)
>
> Missing space before '('.  Appears several times in this patch.
>
> How was this patch tested?

Only compile-tested, admittedly.

> I'd have expected linknamespace test failures from the calls to
> sysinfo (that is, I'd expect you to need to make sysinfo into a weak
> alias for __sysinfo and call __sysinfo here to avoid such namespace
> issues).

You're right. But I'm afraid I'll need more specific advice to fix
that. Doing

-sysinfo                EXTRA   sysinfo         i:p     sysinfo
+sysinfo                EXTRA   sysinfo         i:p     __sysinfo       sysinfo

to syscalls.list wasn't enough. Where should I put a prototype for
__sysinfo? I assume sysdeps/unix/sysv/linux/sys/sysinfo.h is the wrong
place, since that's the installed header.

Rasmus



More information about the Libc-alpha mailing list