History log of /bionic/libc/bionic/sysinfo.cpp
Revision Date Author Comments
c508de0e416049d55ac951cf3971c7b8cf40c4b1 11-Aug-2016 Elliott Hughes <enh@google.com> Use sysinfo(2) to implement more of <sys/sysinfo.h>.

We already had implementations of some of the functions, and I didn't
bother rewriting them when we added sysinfo(2). Ross Anderson said in
https://www.lightbluetouchpaper.org/2016/07/29/yet-another-android-side-channel/
that we should "simply disable access to all procfs files", which made
me curious how many places we use /proc in bionic. This is the one that's
obviously unnecessary. The others I'm not aware of alternative APIs for.

Change-Id: Ia64f36b76f29a7a1dd67845270a5472e121aae10
cb6f599c44b144db26c13507dbd89805b8fe03be 30-Sep-2015 Yabin Cui <yabinc@google.com> Fix the way to count online cpus.

Read /proc/stat to count online cpus is not correct for all android
kernels. Change to reading /sys/devices/system/cpu/online instead.

Bug: 24376925
Change-Id: I3785a6c7aa15a467022a9a261b457194d688fb38
36443fd542a96d2ed71fc294f70fed08c115af55 29-Jul-2015 Elliott Hughes <enh@google.com> Remove PAGE_SIZE from <limits.h>.

It turns out that everyone's still getting PAGE_SIZE from <sys/user.h> via
<sys/ucontext.h> via <signal.h> anyway.

glibc has PAGE_SIZE in <sys/user.h> rather than <limits.h> so this part is
good. The bad part is that we have such wide transitive inclusion of
<sys/user.h>!

Bug: http://b/22735893
Change-Id: I363adffe4a27b4ca1eedf695ea621f5dd2d5ca10
8b5df3920f2843c9cdf04160517c1e8b77c992f5 22-Jan-2015 Elliott Hughes <enh@google.com> Turn on -Wold-style-cast and fix the errors.

A couple of dodgy cases where we cast away const, but otherwise pretty boring.

Change-Id: Ibc39ebd525377792b5911464be842121c20f03b9
9d93986481b67a8135e57fc6400ca8c59f7375f6 15-Nov-2014 Yabin Cui <yabinc@google.com> Add functions in sysinfo.h.

Bug: 17703902

Change-Id: I699d12d76a8fc483c919be730c2ac63641b71a1d